Function at 0x4605f0
Capabilities:
Encode data using xor
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x410
push ebx
mov ebx, dword [esp + 0x418]
push ebp
push esi
test ebx, ebx
push edi
mov ebp, ecx
je 0x4608e2
mov al, byte [ebx]
mov byte [esp + 0x13], 0
test al, al
mov dword [esp + 0x14], 0
je 0x460649
mov edi, dword [sym.imp.MSVCRT.dll_tolower]
mov esi, ebx
movsx eax, al
push eax
call edi
mov ecx, eax
mov eax, dword [esp + 0x18]
mov edx, eax
add esp, 4
shl edx, 4
add ecx, edx
xor eax, ecx
inc esi
mov dword [esp + 0x14], eax
mov al, byte [esi]
test al, al
jne 0x460626
lea eax, [ebp + 0x408]
xor edi, edi
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [eax]
cmp ecx, edx
jne 0x4606de
lea edx, [ebp + 4]
push 0x4d27d0
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x4608db
mov eax, dword [ebp + 0x508]
push 0
lea ecx, [eax + 0x400]
imul ecx, edi
lea edx, [ecx + eax + 0x100]
push edx
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
push esi
jne 0x4608d2
push 1
lea eax, [esp + 0x24]
push 0x400
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
test eax, eax
push esi
je 0x4608d2
call dword [sym.imp.MSVCRT.dll_fclose]
lea ecx, [esp + 0x20]
push ecx
push ebx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 0xc
test eax, eax
je 0x46070d
mov eax, dword [esp + 0x18]
inc edi
add eax, 4
cmp edi, 0x20
mov dword [esp + 0x18], eax
jl 0x460655
mov ebx, 0x1f
lea eax, [ebp + 0x504]
cmp dword [eax], 0
jne 0x46073e
dec ebx
sub eax, 4
test ebx, ebx
jge 0x4606fe
jmp 0x460752
cmp edi, 0x20
jge 0x4606f3
mov edx, dword [ebp + 0x488]
lea ecx, [ebp + 0x488]
lea eax, [edi + 1]
xor ebx, ebx
cmp edx, eax
mov byte [esp + 0x13], 1
je 0x4607a3
cmp ebx, 0x20
jge 0x460782
mov edx, dword [ecx + 4]
add ecx, 4
inc ebx
cmp edx, eax
jne 0x46072c
jmp 0x460782
test ebx, ebx
jl 0x460752
cmp ebx, 0x1f
jge 0x460753
mov eax, dword [ebp + ebx*4 + 0x488]
test eax, eax
je 0x460753
inc ebx
mov edi, dword [ebp + ebx*4 + 0x488]
dec edi
cmp edi, 0xffffffff
jne 0x460782
mov ecx, dword [ebp + 0x408]
lea eax, [ebp + 0x408]
xor edi, edi
test ecx, ecx
je 0x460782
cmp edi, 0x20
jge 0x460782
mov ecx, dword [eax + 4]
add eax, 4
inc edi
test ecx, ecx
jne 0x460772
test ebx, ebx
jl 0x46078b
cmp ebx, 0x20
jl 0x4607a3
mov ecx, ebp
call fcn.00460380
test al, al
jne 0x4607bb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x410
ret 8
test edi, edi
jl 0x4607ac
cmp edi, 0x20
jl 0x4607bf
mov ecx, ebp
call fcn.00460380
test al, al
je 0x4608e2
xor edi, edi
xor ebx, ebx
lea edx, [ebp + 4]
push 0x4d46c8
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x4608db
mov eax, dword [esp + 0x14]
lea ecx, [edi*4]
push 0
push ecx
push esi
mov dword [ebp + edi*4 + 0x408], eax
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
push esi
jne 0x4608d2
push 1
lea edx, [esp + 0x1c]
push 4
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x4608d1
lea eax, [edi*4 + 0x80]
push 0
push eax
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x4608d1
mov ecx, dword [ebp + 0x510]
lea eax, [ebp + 0x510]
push esi
push 1
inc ecx
push 4
push eax
mov dword [eax], ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x4608d1
mov ecx, dword [ebp + 0x508]
push 0
add ecx, 0x400
imul ecx, edi
add ecx, 0x100
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x4608d1
mov eax, dword [ebp + 0x508]
test eax, eax
jle 0x4608ab
mov ecx, dword [esp + 0x428]
test ecx, ecx
je 0x4608ab
push esi
push 1
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x4608d1
mov al, byte [esp + 0x13]
test al, al
jne 0x4608f1
mov edx, dword [esp + 0x424]
push esi
push 1
push 0x400
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 1
je 0x4608f1
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov ecx, ebp
call fcn.00460380
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x410
ret 8
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
test ebx, ebx
jle 0x46091e
lea eax, [ebx*4]
lea ecx, [ebp + 0x488]
push eax
lea edx, [ebp + 0x48c]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
inc edi
mov al, 1
mov dword [ebp + 0x488], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x410
ret 8