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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x41c280]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov eax, edx
mov dword [ebp - 0x10], 0x41ea54
push edi
mov dword [ebp - 0x2c], eax
mov ebx, ecx
add eax, 8
mov dword [ebp - 0x30], ebx
push eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x1c], 0
push 0x40
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], 0x41ea54
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x402bcc
push 4
mov edx, ebx
lea ecx, [ebp - 0x14]
call fcn.00402290
add esp, 4
test eax, eax
je 0x402bad
mov eax, dword [ebp - 0x28]
mov esi, dword [ebx + 4]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], esi
cmp eax, dword [ebx]
je 0x402bad
mov edx, dword [ebp - 0x1c]
lea ecx, [ecx]
mov edi, dword [ebp - 0x18]
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], 0x41ea54
mov ecx, dword [edi]
cmp ecx, 6
ja case.0x402a1c.3
jmp dword [ecx*4 + 0x402be0]
mov ecx, dword [esi]
cmp ecx, 6
ja case.0x402a1c.3
jmp dword [ecx*4 + 0x402bfc]
mov esi, dword [ebp - 0x2c]
add esi, 8
push esi
push eax
push edx
call fcn.0040d890
add esp, 0xc
jmp 0x402b63
mov ecx, dword [ebp - 0x2c]
push 0
add ecx, 8
push ecx
push edx
push eax
mov eax, dword [esi + 4]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov ebx, eax
jmp 0x402b5f
mov ecx, dword [ebp - 0x2c]
add ecx, 8
push ecx
mov ecx, dword [esi + 4]
push eax
mov ecx, dword [ecx]
call fcn.00402060
add esp, 8
mov ebx, eax
jmp 0x402b5f
push 0
push 0
push eax
mov eax, dword [esi + 4]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x402bad
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x2c]
add eax, 8
push eax
mov eax, dword [ebp - 0x10]
push dword [ebp - 0x1c]
mov eax, dword [eax + 4]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
jmp 0x402b5f
cmp dword [esi], ebx
jne 0x402b1c
mov ecx, dword [ebp - 0x2c]
push 0
add ecx, 8
push ecx
push eax
mov eax, dword [edi + 4]
push edx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ebx, eax
jmp 0x402b5f
cmp dword [esi], ebx
jne 0x402b1c
test edx, edx
je 0x402af7
mov eax, dword [edi + 4]
push 0
push 0
push edx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x402bad
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
push 0
lea ecx, [ebp - 0xc]
push ecx
mov ecx, dword [ebp - 0x2c]
add ecx, 8
push ecx
push eax
mov eax, dword [edi + 4]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
jmp 0x402b5f
cmp dword [esi], ebx
je case.0x402a1c.3
mov esi, dword [ebp - 0x2c]
add esi, 8
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x402bad
push esi
lea edx, [ebp - 0x14]
lea ecx, [ebp - 0x24]
call fcn.00402290
add esp, 4
test eax, eax
je 0x402b56
push esi
lea edx, [ebp - 0x24]
lea ecx, [ebp - 0x1c]
call fcn.00402290
add esp, 4
mov ebx, eax
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
je 0x402bad
mov ebx, dword [ebp + 8]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebx]
cmp eax, dword [ecx + edx]
jne 0x402b7c
mov eax, dword [ebx + 4]
cmp eax, dword [ecx + edx + 4]
je 0x402b90
mov ecx, dword [ebp - 0x30]
mov eax, dword [edx]
mov dword [ebp - 0x14], eax
cmp eax, dword [ecx]
je case.0x402a1c.3
mov esi, dword [ebp - 0x10]
jmp 0x4029f0
mov esi, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040597a
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x1c]
push edx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, esi
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 [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040597a
mov esp, ebp
pop ebp
ret