Function at 0x403230
Capabilities:
Encode data using xor
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x94
mov eax, dword [0x4237cc]
push ebx
push ebp
push esi
push edi
push 0
push 0x80
push 4
push 0
push 3
push reloc.WS2_32.dll_bind
push eax
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4032a1
mov edx, dword [0x4237c4]
lea ecx, [esp + 0x24]
push 0x80
push ecx
push 0x7e
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
mov ecx, dword [edi + 4]
push 0
lea eax, [esp + 0x28]
push 0
push eax
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
xor ebx, ebx
test edi, edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x14], ebx
jbe 0x4033d8
jmp 0x4032c4
mov ebx, dword [esp + 0x14]
push 0
push 0
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x18]
mov edi, 4
push 0
push edx
lea eax, [esp + 0x24]
push edi
push eax
push esi
lea ebx, [esp + 0x30]
call ebp
test eax, eax
je 0x403313
mov eax, dword [esp + 0x18]
cmp edi, eax
je 0x403319
test eax, eax
je 0x403319
lea ecx, [esp + 0x18]
sub edi, eax
push 0
add ebx, eax
push ecx
push edi
push ebx
push esi
call ebp
test eax, eax
jne 0x4032f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0x10]
mov edi, 0x24
push 0
push edx
lea eax, [esp + 0x2c]
push edi
push eax
push esi
lea ebx, [esp + 0x38]
call ebp
test eax, eax
je 0x403356
mov eax, dword [esp + 0x10]
cmp edi, eax
je 0x40335c
test eax, eax
je 0x40335c
lea ecx, [esp + 0x10]
sub edi, eax
push 0
add ebx, eax
push ecx
push edi
push ebx
push esi
call ebp
test eax, eax
jne 0x403336
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov cl, byte [esp + 0x24]
mov dl, 0x7a
test cl, cl
lea eax, [esp + 0x24]
je 0x403378
xor cl, dl
inc dl
mov byte [eax], cl
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40336a
mov edi, dword [esp + 0xa8]
lea eax, [esp + 0x24]
mov dl, byte [eax]
mov bl, byte [edi]
mov cl, dl
cmp dl, bl
jne 0x4033ab
test cl, cl
je 0x4033a7
mov dl, byte [eax + 1]
mov bl, byte [edi + 1]
mov cl, dl
cmp dl, bl
jne 0x4033ab
add eax, 2
add edi, 2
test cl, cl
jne 0x403383
xor eax, eax
jmp 0x4033b0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4033d0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
lea eax, [eax + ecx + 4]
mov ecx, dword [esp + 0x20]
cmp eax, ecx
mov dword [esp + 0x14], eax
jb 0x4032c0
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x20]
cmp ebx, edi
je 0x4034b0
mov edx, dword [esp + 0x1c]
push 0
push 0
lea eax, [edx + ebx + 4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub edi, dword [esp + 0x1c]
sub edi, ebx
sub edi, 4
push edi
call fcn.004150af
add esp, 4
lea ecx, [esp + 0x18]
mov ebp, eax
mov ebx, edi
push 0
push ecx
push edi
push ebp
push esi
mov dword [esp + 0x24], ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40344e
mov eax, dword [esp + 0x18]
cmp ebx, eax
je 0x403454
test eax, eax
je 0x403454
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x18]
sub ebx, eax
push 0
add ecx, eax
push edx
push ebx
push ecx
push esi
mov dword [esp + 0x24], ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403422
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x14]
push 0
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x10]
push 0
push ecx
push edi
push ebp
push esi
mov ebx, ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40349a
mov eax, dword [esp + 0x10]
cmp edi, eax
je 0x4034a0
lea edx, [esp + 0x10]
sub edi, eax
push 0
add ebx, eax
push edx
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40347a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebp
call fcn.00415417
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret 4