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

Disassembly:
push esi
mov esi, esp
push 0xffffffffffffffff
push 0x4306a7
mov eax, dword fs:[0]
push eax
sub esp, 0x1c4
mov eax, dword [0x43dfc0]
xor eax, esi
mov dword [esi - 0x10], eax
push ebp
push ebx
push edi
push eax
mov edi, ecx
lea eax, [esi - 0xc]
mov dword fs:[0], eax
mov ebp, dword [esi + 0x10]
xor eax, eax
mov ebx, dword [esi + 8]
mov ecx, dword [esi + 0x14]
mov dword [esi - 0x44], ecx
mov ecx, dword [edi + 4]
cmp ecx, 0xffffffff
mov dword [esi - 0x4c], ebp
mov dword [esi - 0x50], eax
jne 0x415184
lea edx, [esi - 0x44]
push edx
lea ecx, [esi - 0x70]
mov dword [esi - 0x44], 0x433124
call fcn.0041b2c2
push 0x43a7cc
lea eax, [esi - 0x70]
push eax
mov dword [esi - 0x70], 0x432fc8
call fcn.0041b780
lea edx, [esi - 0x64]
mov ebp, dword [edi + 0x10]
mov dword [esi - 0x54], eax
mov dword [esi - 0x64], eax
mov dword [esi - 0x60], eax
mov dword [esi - 0x5c], eax
mov dword [esi - 0x58], eax
push edx
mov eax, dword [esi + 0xc]
mov dword [esi - 0x54], ebp
lea edx, [esi - 0x50]
push edx
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4151de
call ebp
cmp eax, 0x3e5
je 0x4151de
call ebp
push eax
push 0x433118
lea ecx, [esi - 0x40]
call fcn.00407c70
push 0x4397cc
lea ecx, [esi - 0x40]
push ecx
call fcn.0041b780
mov eax, dword [edi + 0x10]
mov edx, dword [esi + 0x18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x41521b
lea ebp, [esi - 0x44]
push ebp
lea ecx, [esi - 0x70]
mov dword [esi - 0x44], 0x433104
call fcn.0041b2c2
push 0x4387d8
lea edx, [esi - 0x70]
push edx
mov dword [esi - 0x70], 0x43139c
call fcn.0041b780
or eax, eax
je 0x41523d
call ebp
push eax
push str.WaitForSingleObject_after_WriteFile
lea ecx, [esi - 0x40]
call fcn.00407c70
push 0x4397cc
lea eax, [esi - 0x40]
push eax
call fcn.0041b780
mov eax, dword [edi + 4]
lea ecx, [esi - 0x50]
push 1
lea edx, [esi - 0x64]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
or eax, eax
jne 0x415262
call ebp
push eax
push str.GetOverlappedResult_from_WriteFile
jmp 0x4151c8
cmp dword [0x43f2d0], 0x3e8
mov ebp, 0x64
jne 0x4152ff
push 1
lea ecx, [esi - 0x120]
call fcn.00406150
mov dword [eax + 0x60], ebp
sub eax, 0xfffffff0
mov edx, dword [esi - 0x50]
push edx
push str.Heci::SendMsg_WriteFile_bytesWritten
push eax
mov dword [esi - 4], 0
call fcn.00404170
mov ecx, eax
sub esp, 0xfffffff8
call fcn.004049b0
push eax
call fcn.00405590
mov dword [esi - 4], 0xffffffff
add esp, 4
lea ecx, [esi - 0x120]
call fcn.00401a20
push 1
lea ecx, [esi - 0x120]
call fcn.00406150
mov ecx, dword [esi + 0xc]
push ecx
mov dword [eax + 0x60], ebp
push ebx
add eax, 0x10
push eax
mov dword [esi - 4], 1
call fcn.0040b6a0
mov dword [esi - 4], 0xffffffff
lea ecx, [esi - 0x120]
add esp, 0xc
call fcn.00401a20
mov ecx, dword [edi + 0x10]
mov ebx, dword [esi - 0x4c]
xor edx, edx
mov dword [esi - 0x54], edx
or ebx, ebx
mov dword [esi - 0x64], edx
mov dword [esi - 0x60], edx
mov dword [esi - 0x5c], edx
mov dword [esi - 0x58], edx
mov eax, dword [edi + 8]
mov dword [esi - 0x54], ecx
mov dword [esi - 0x48], 0
je 0x4154df
cmp dword [esi - 0x44], 0
je 0x4154df
lea ecx, [esi - 0x64]
lea edx, [esi - 0x48]
push ecx
push edx
push eax
mov eax, dword [edi + 4]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
or eax, eax
jne 0x41536b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x41536b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x433088
jmp 0x4151c8
mov eax, dword [edi + 0x10]
mov edx, dword [esi + 0x1c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4153a8
lea ebp, [esi - 0x4c]
lea ecx, [esi - 0x70]
push ebp
mov dword [esi - 0x4c], 0x433074
call fcn.0041b2c2
push 0x4387d8
lea edx, [esi - 0x70]
mov dword [esi - 0x70], 0x43139c
push edx
jmp 0x4151d9
test eax, eax
je 0x4153ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WaitForSingleObject_after_ReadFile
lea ecx, [esi - 0x40]
call fcn.00407c70
push 0x4397cc
lea eax, [esi - 0x40]
push eax
jmp 0x4151d9
mov eax, dword [edi + 4]
push 1
lea ecx, [esi - 0x48]
push ecx
lea edx, [esi - 0x64]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x4153f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetOverlappedResult_from_ReadFile
jmp 0x4151c8
mov edx, dword [esi - 0x48]
mov eax, dword [esi - 0x44]
mov dword [eax], edx
cmp dword [0x43f2d0], 0x3e8
jne 0x4154df
push 1
lea ecx, [esi - 0x120]
call fcn.00406150
mov dword [eax + 0x60], ebp
mov ecx, dword [0x43f2d0]
push ecx
add eax, 0x10
push str.Debug_level:
push eax
mov dword [esi - 4], 2
call fcn.00404170
add esp, 8
mov ecx, eax
call fcn.00414f20
push eax
call fcn.00405590
or edi, 0xffffffff
add esp, 4
lea ecx, [esi - 0x120]
mov dword [esi - 4], edi
call fcn.00401a20
push 1
lea ecx, [esi - 0x120]
call fcn.00406150
mov dword [eax + 0x60], ebp
mov edx, dword [esi - 0x48]
push edx
add eax, 0x10
push str.Heci::SendMsg_ReadFile_bytesRead
push eax
mov dword [esi - 4], 3
call fcn.00404170
add esp, 8
mov ecx, eax
call fcn.004049b0
push eax
call fcn.00405590
sub esp, 0xfffffffc
lea ecx, [esi - 0x120]
mov dword [esi - 4], edi
call fcn.00401a20
push 1
lea ecx, [esi - 0x1d0]
call fcn.00406150
mov dword [eax + 0x60], ebp
mov ecx, dword [esi - 0x48]
push ecx
add eax, 0x10
push ebx
push eax
mov dword [esi - 4], 4
call fcn.0040b6a0
sub esp, 0xfffffff4
lea ecx, [esi - 0x1d0]
mov dword [esi - 4], edi
call fcn.00401a20
mov ebx, dword [esi - 0xc]
mov dword fs:[0], ebx
mov ecx, dword [esi - 0x10]
xor ecx, esi
pop ebp
pop edi
pop ebx
pop ebp
call fcn.0041b771
mov esp, esi
pop esi
ret 0x18