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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42fdf8
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x443004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x74], esi
mov ebx, ecx
test ebx, ebx
jne 0x402c5d
push 0x2d3
push str.....IORequestGeneratorIORequestGenerator.cpp
push str.nullptr__p
call fcn.0042231d
add esp, 0xc
test esi, esi
jne 0x402c78
push 0x2d4
push str.....IORequestGeneratorIORequestGenerator.cpp
push str.nullptr___hCompletionPort
call fcn.0042231d
add esp, 0xc
mov ecx, dword [ebx + 0x3c]
xor eax, eax
sub ecx, dword [ebx + 0x38]
xor edi, edi
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], eax
mov eax, 0x66666667
imul ecx
mov ecx, dword [ebx + 0xc]
sub ecx, dword [ebx + 8]
sar edx, 3
mov eax, edx
mov byte [ebp - 0x3d], 1
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x48], eax
mov eax, dword [ebx + 4]
mov al, byte [eax + 0x31]
mov byte [ebp - 0x6c], al
mov eax, 0x2e8ba2e9
imul ecx
xor eax, eax
lea ecx, [ebp - 0x2c]
sar edx, 5
mov esi, edx
mov dword [ebp - 0x2c], eax
shr esi, 0x1f
add esi, edx
mov dword [ebp - 0x28], eax
push esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x24], eax
call fcn.00407640
mov dword [ebp - 4], edi
mov byte [ebp - 0x3e], 0
test esi, esi
je 0x402d47
mov eax, dword [ebp - 0x2c]
xor esi, esi
mov edi, dword [ebp - 0x4c]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 4]
add ecx, esi
mov eax, dword [eax + 0x1c]
test eax, eax
mov edx, dword [ecx + 0x70]
mov dword [ebp - 0x4c], eax
mov eax, edx
je 0x402d11
xor edx, edx
div dword [ebp - 0x4c]
jmp 0x402d16
xor edx, edx
div dword [ecx + 0x40]
mov edx, eax
mov eax, dword [ecx + 0x7c]
test eax, eax
jne 0x402d24
cmp dword [ecx + 0x74], eax
jbe 0x402d38
push edx
push dword [ecx + 0x74]
mov byte [ebp - 0x3e], 1
push dword [ecx + 0x18]
mov ecx, dword [ebp - 0x44]
push eax
call fcn.0040d170
add dword [ebp - 0x44], 0x38
add esi, 0xb0
sub edi, 1
jne 0x402cf3
mov edx, dword [ebp - 0x48]
test edx, edx
je 0x402dc2
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x44], eax
mov esi, dword [ebx + 0x38]
add esi, eax
mov dword [esi], 0
test ecx, ecx
jne 0x402d89
test edi, edi
je 0x402d82
push 0x2d
push str.....IORequestGeneratorOverlappedQueue.cpp
push str._pTail__nullptr
call fcn.0042231d
mov eax, dword [ebp - 0x44]
add esp, 0xc
mov edx, dword [ebp - 0x48]
mov ecx, esi
mov dword [ebp - 0x1c], ecx
jmp 0x402dac
test edi, edi
jne 0x402daa
push 0x32
push str.....IORequestGeneratorOverlappedQueue.cpp
push str._pTail___nullptr
call fcn.0042231d
mov eax, dword [ebp - 0x44]
add esp, 0xc
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x48]
mov dword [edi], esi
inc dword [ebp - 0x14]
add eax, 0x14
sub edx, 1
mov dword [ebp - 0x44], eax
mov edi, esi
mov dword [ebp - 0x48], edx
jne 0x402d55
mov dword [ebp - 0x18], edi
cmp dword [0x4444fc], 0
je 0x40320f
nop
cmp dword [0x4444f8], 0
jne 0x40320f
mov esi, dword [ebp - 0x14]
or edi, 0xffffffff
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x68], 0
test esi, esi
je 0x40303a
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x402e13
push 0x40
push str.....IORequestGeneratorOverlappedQueue.cpp
push str._IsEmpty__
call fcn.0042231d
mov eax, dword [ebp - 0x1c]
add esp, 0xc
mov edi, eax
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
mov ecx, edi
neg eax
sbb eax, eax
sub ecx, dword [ebx + 0x38]
and dword [ebp - 0x18], eax
mov eax, 0x66666667
imul ecx
mov eax, dword [ebx + 0x44]
sar edx, 3
mov esi, edx
dec dword [ebp - 0x14]
shr esi, 0x1f
add esi, edx
mov dword [ebp - 0x4c], esi
lea ecx, [esi*4]
mov dword [ebp - 0x54], ecx
mov ecx, dword [ecx + eax]
mov eax, dword [ebx + 0x50]
lea edx, [ecx*4]
sub esi, dword [edx + eax]
mov eax, dword [ebx + 8]
mov dword [ebp - 0x44], edx
imul edx, ecx, 0xb0
mov dword [ebp - 0x64], esi
add eax, edx
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x48], eax
lea eax, [ecx*8]
sub eax, ecx
mov ecx, dword [ebp - 0x2c]
lea esi, [ecx + eax*8]
mov ecx, esi
call fcn.0040d200
cmp byte [esi], 0
je 0x402f00
test eax, eax
je 0x402f00
cmp dword [ebp - 0x50], eax
jb 0x402e98
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov dword [edi], 0
test eax, eax
jne 0x402ed4
test esi, esi
je 0x402ec0
push 0x2d
push str.....IORequestGeneratorOverlappedQueue.cpp
push str._pTail__nullptr
call fcn.0042231d
add esp, 0xc
mov esi, dword [ebp - 0x14]
mov eax, edi
inc esi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], esi
jmp 0x403028
test esi, esi
jne 0x402eef
push 0x32
push str.....IORequestGeneratorOverlappedQueue.cpp
push str._pTail___nullptr
call fcn.0042231d
mov eax, dword [ebp - 0x1c]
add esp, 0xc
mov dword [esi], edi
mov esi, dword [ebp - 0x14]
inc esi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], esi
jmp 0x403028
cmp byte [ebp - 0x6c], 0
je 0x402f23
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov ecx, dword [ebx + 0x68]
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x34]
mov dword [ecx + edx*8], eax
mov eax, dword [ebp - 0x30]
mov dword [ecx + edx*8 + 4], eax
mov eax, dword [ebp - 0x48]
mov eax, dword [eax + 0x68]
mov dword [ebp - 0x5c], eax
call fcn.00420963
cdq
mov ecx, 0x64
idiv ecx
lea eax, [edx + 1]
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 0x54]
cmp dword [ebp - 0x5c], eax
mov dword [ebp - 0x70], eax
mov eax, dword [ebx + 0x5c]
sbb ecx, ecx
add ecx, 2
mov dword [edx + eax], ecx
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x60]
cmp dword [ebp - 0x70], eax
jbe 0x402f8c
mov eax, dword [ebx + 8]
mov edx, dword [ebp - 0x44]
push edi
mov edi, dword [ebp - 0x48]
mov ecx, dword [ecx + eax + 0x18]
imul ecx, dword [ebp - 0x64]
mov eax, dword [ebx + 0x2c]
push 0
push dword [edi + 0x18]
add ecx, dword [eax + edx]
mov eax, dword [ebx + 0x14]
push ecx
push dword [eax + edx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x402fd3
mov eax, dword [ebp - 0x48]
add ecx, dword [ebx + 8]
mov eax, dword [eax + 0x18]
cmp dword [ecx + 0x88], 0
mov dword [ebp - 0x54], eax
jne 0x402fb3
mov ecx, dword [ecx + 0x18]
imul ecx, dword [ebp - 0x64]
mov eax, dword [ebx + 0x2c]
mov edx, dword [ebp - 0x44]
add ecx, dword [eax + edx]
jmp 0x402fbd
call fcn.00414860
mov edx, dword [ebp - 0x44]
mov ecx, eax
mov eax, dword [ebx + 0x14]
push edi
push 0
push dword [ebp - 0x54]
push ecx
push dword [eax + edx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [ebp - 0x48]
test eax, eax
jne 0x402fe8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x403257
cmp byte [esi], 0
je 0x403022
mov eax, dword [edi + 0x18]
add dword [esi + 8], eax
adc dword [esi + 0xc], 0
inc dword [esi + 0x30]
cmp byte [esi + 2], 0
mov eax, dword [esi + 0x30]
je 0x403022
cmp eax, dword [esi + 0x2c]
jb 0x403022
mov dword [esi + 0x30], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, dword [esi + 0x28]
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], 0
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x68]
inc ecx
mov dword [ebp - 0x68], ecx
cmp ecx, esi
jb 0x402df8
mov edi, dword [ebp - 0x50]
cmp byte [ebp - 0x3e], 0
je 0x403067
mov ecx, dword [ebx + 0x3c]
mov eax, 0x66666667
sub ecx, dword [ebx + 0x38]
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jne 0x403067
cmp edi, 0xffffffff
je 0x403067
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_GetQueuedCompletionStatus]
test eax, eax
je 0x4031f1
mov edi, dword [ebp - 0x3c]
mov eax, 0x66666667
mov ecx, edi
sub ecx, dword [ebx + 0x38]
imul ecx
mov eax, dword [ebx + 0x44]
sar edx, 3
mov esi, edx
shr esi, 0x1f
add esi, edx
mov edx, dword [ebp - 0x20]
mov ecx, dword [eax + esi*4]
imul eax, ecx, 0xb0
mov dword [ebp - 0x50], ecx
add eax, dword [ebx + 8]
mov dword [ebp - 0x4c], eax
mov eax, dword [eax + 0x18]
cmp edx, eax
je 0x4030d9
push eax
push edx
push dword [ebx + 0x88]
push str.Warning:_thread__u_transferred__u_bytes_instead_of__u_bytes_n
call fcn.00402820
mov edi, dword [ebp - 0x3c]
add esp, 0x10
mov ecx, dword [ebp - 0x50]
mov eax, dword [edi + 0xc]
mov edi, dword [edi + 8]
mov dword [ebp - 0x54], eax
mov eax, dword [ebx + 0x90]
cmp byte [eax], 0
je 0x403121
mov eax, dword [ebx + 4]
imul ecx, ecx, 0xc8
movzx eax, byte [eax + 0x32]
push eax
push dword [ebp - 0x6c]
mov eax, dword [ebx + 0x68]
push dword [ebx + 0x94]
lea eax, [eax + esi*8]
push eax
mov eax, dword [ebx + 0x5c]
push dword [eax + esi*4]
mov eax, dword [ebx + 0x98]
push dword [ebp - 0x20]
add ecx, dword [eax]
call fcn.00401d50
mov eax, dword [ebx]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x403147
mov ecx, dword [ebp - 0x58]
inc ecx
mov dword [ebp - 0x58], ecx
cmp ecx, eax
jne 0x403147
push 0x4384f0
call fcn.004027e0
add esp, 4
xor eax, eax
mov dword [ebp - 0x58], eax
push dword [ebp - 0x54]
mov edx, dword [ebp - 0x50]
mov ecx, ebx
push edi
call fcn.00402920
mov edi, eax
add esp, 8
mov eax, dword [ebp - 0x3c]
mov esi, edx
push 0
mov dword [eax + 8], edi
mov eax, dword [ebp - 0x3c]
mov dword [eax + 0xc], esi
mov eax, dword [ebp - 0x4c]
push dword [eax + 0x18]
push esi
push edi
call fcn.0042fab0
push edx
push eax
mov eax, dword [ebx]
push esi
push edi
push dword [ebp - 0x50]
movzx eax, byte [eax + 0xc]
push dword [ebx + 0x88]
push str.t__u:_u__new_I_O_op_at__I64u__starting_in_block:__I64u__n
push eax
call fcn.00402860
mov esi, dword [ebp - 0x3c]
add esp, 0x20
cmp dword [ebp - 0x1c], 0
mov dword [esi], 0
jne 0x4031cc
cmp dword [ebp - 0x18], 0
je 0x4031c1
push 0x2d
push str.....IORequestGeneratorOverlappedQueue.cpp
push str._pTail__nullptr
call fcn.0042231d
add esp, 0xc
inc dword [ebp - 0x14]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
jmp 0x403202
mov edi, dword [ebp - 0x18]
test edi, edi
jne 0x4031e7
push 0x32
push str.....IORequestGeneratorOverlappedQueue.cpp
push str._pTail___nullptr
call fcn.0042231d
add esp, 0xc
inc dword [ebp - 0x14]
mov dword [edi], esi
mov dword [ebp - 0x18], esi
jmp 0x403202
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x102
jne 0x403288
cmp dword [0x4444fc], 0
jne 0x402dd0
mov al, byte [ebp - 0x3d]
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
je 0x40323b
mov ecx, dword [ebp - 0x24]
mov eax, 0x92492493
sub ecx, ebx
imul ecx
add edx, ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
push ebx
call fcn.004019c0
mov al, byte [ebp - 0x3d]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041a002
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x5c]
mov esi, str.read
cmp dword [ebp - 0x70], eax
ja 0x403269
mov esi, str.write
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push dword [ebp - 0x4c]
push str.t__u__error_during__s_error_code:__u__n
call fcn.00402820
add esp, 0x10
xor al, al
mov byte [ebp - 0x3d], al
jmp 0x403212
push eax
push str.error_during_overlapped_IO_operation__error_code:__u__n
call fcn.00402820
add esp, 8
xor al, al
mov byte [ebp - 0x3d], al
jmp 0x403212