Function at 0x402290
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x41c280]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, ecx
mov dword [ebp - 0x10], 0x41ea54
push esi
mov esi, edx
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov edx, dword [ebx + 4]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x18], ecx
mov eax, dword [edx]
cmp eax, 6
ja case.0x4022dc.3
jmp dword [eax*4 + 0x402480]
mov eax, dword [esi + 4]
mov edx, dword [eax]
cmp edx, 6
ja case.0x4022dc.3
jmp dword [edx*4 + 0x40249c]
push edi
push dword [esi]
push dword [ebx]
call fcn.0040d890
mov ecx, 1
add esp, 0xc
mov eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040597a
mov esp, ebp
pop ebp
ret
mov eax, dword [eax + 4]
push 0
push edi
push dword [ebx]
push dword [esi]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov ecx, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040597a
mov esp, ebp
pop ebp
ret
mov ecx, dword [eax + 4]
mov edx, dword [ebx]
push edi
push dword [esi]
mov ecx, dword [ecx]
call fcn.00402060
add esp, 8
mov ecx, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040597a
mov esp, ebp
pop ebp
ret
mov eax, dword [eax + 4]
push 0
push 0
push dword [esi]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x40246a
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [esi + 4]
push edi
push dword [ebx]
mov eax, dword [eax + 4]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040597a
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
cmp dword [eax], ecx
jne 0x402418
mov eax, dword [edx + 4]
push 0
push edi
push dword [esi]
push dword [ebx]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ecx, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040597a
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
cmp dword [eax], ecx
jne 0x402418
mov eax, dword [ebx]
test eax, eax
je 0x4023e7
push 0
push 0
push eax
mov eax, dword [edx + 4]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x40246a
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebx + 4]
push edi
push dword [esi]
mov eax, dword [eax + 4]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040597a
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
cmp dword [eax], ecx
je case.0x4022dc.3
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40246a
push edi
mov edx, esi
lea ecx, [ebp - 0x14]
call fcn.00402290
add esp, 4
test eax, eax
je 0x40244b
push edi
lea edx, [ebp - 0x14]
mov ecx, ebx
call fcn.00402290
add esp, 4
mov dword [ebp - 0x18], eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x18]
mov eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040597a
mov esp, ebp
pop ebp
ret
xor ecx, ecx
mov eax, ecx
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040597a
mov esp, ebp
pop ebp
ret