Function at 0x41aac0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov edx, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x28], ecx
mov byte [esp + 0xe], 1
mov eax, dword [edi + 0x10]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x10]
mov esi, eax
neg esi
sbb esi, esi
xor ebx, ebx
and esi, 0x20000000
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
test eax, eax
je 0x41ab1e
mov edx, dword [eax + 0x414]
mov dword [esp + 0x10], edx
cmp edx, 0xffffffff
je 0x41ab51
mov byte [esp + 0xe], bl
lea ebx, [eax + 0x418]
mov dword [esp + 0x14], ebx
jmp 0x41ab7d
cmp dword [ecx + 0x3c], ebx
jle 0x41ab54
push 3
push 1
push edx
add ecx, 0xd4
call fcn.00416c20
mov ecx, eax
mov dword [esp + 0x18], ecx
test ecx, ecx
je 0x41ab51
mov edx, dword [ecx + 4]
mov byte [esp + 0xe], bl
lea ebx, [ecx + 0x10]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ebx
jmp 0x41ab7d
mov edx, dword [ebp + 0xc]
xor eax, eax
cmp dword [ebp + 0x10], eax
push 0
push esi
push 3
sete al
push 0
lea eax, [eax*4 + 3]
push eax
push bind
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, eax
mov dword [esp + 0x10], eax
cmp edx, 0xffffffff
jne 0x41ac10
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
mov eax, dword [esp + 0x20]
add eax, 0x2022
push str._ER_r_nErrno:__u_r_n_r_n
push eax
call fcn.00401480
add esp, 0xc
call esi
push eax
push dword [ebp + 0x1c]
mov eax, dword [ebp + 0xc]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push eax
push str._CreateFile___s__off_llu__len_d__err_d_n
call fcn.00401410
mov ebx, dword [esp + 0x30]
add esp, 0x18
test ebx, ebx
je 0x41ac00
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x41ac00
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
je 0x41abe5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebx + 0x44], 0
lea eax, [ebx + 0x10]
jne 0x41abf5
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push 0x48
push ebx
call fcn.0041beab
add esp, 8
mov ecx, edi
call fcn.004189f0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebp + 0x1c]
mov eax, ecx
mov esi, dword [esp + 0x28]
cdq
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x20], 0
idiv dword [esi + 0x34]
lea esi, [ecx + 0x40a]
mov byte [esp + 0xf], 1
lea esi, [esi + eax*4]
mov eax, dword [edi + 0x4034]
test eax, eax
je 0x41ac56
cmp dword [edi + 0x4038], esi
jge 0x41ac6d
test eax, eax
je 0x41ac56
push eax
call fcn.00424799
add esp, 4
push 0x40
push esi
call fcn.004247b8
add esp, 8
mov dword [edi + 0x4034], eax
mov dword [edi + 0x4038], esi
mov edi, dword [edi + 0x4034]
test ebx, ebx
je 0x41ac8f
cmp byte [ebx + 0x34], 0
je 0x41ac88
lea eax, [ebx + 0x18]
push eax
mov eax, dword [ebx + 0x24]
call eax
jmp 0x41ac8f
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 0x1c]
test eax, eax
jle 0x41ae04
xor ecx, ecx
nop dword [eax]
mov ebx, eax
mov dword [esp + 0x24], edi
mov eax, dword [esp + 0x28]
sub ebx, ecx
mov esi, 4
mov eax, dword [eax + 0x34]
cmp eax, ebx
cmovl ebx, eax
cmp byte [esp + 0xf], 0
lea eax, [edi + 4]
mov dword [esp + 0x2c], eax
je 0x41ad12
movups xmm0, xmmword [str.OK_r_nTrans_Type:_Chunked_r_n_r_n]
mov esi, edi
mov byte [esp + 0xf], 0
movups xmmword [edi], xmm0
movq xmm0, qword [0x445d20]
lea edx, [esi + 1]
movq qword [edi + 0x10], xmm0
mov eax, dword [0x445d28]
mov dword [edi + 0x18], eax
mov al, byte [0x445d2c]
mov byte [edi + 0x1c], al
mov al, byte [esi]
inc esi
test al, al
jne 0x41acf8
sub esi, edx
lea eax, [esi + edi]
add esi, 4
mov dword [esp + 0x24], eax
lea eax, [esi + edi]
mov dword [esp + 0x2c], eax
mov eax, ecx
mov dword [esp + 0x30], 0
cdq
add eax, dword [ebp + 0x14]
push 0
adc edx, dword [ebp + 0x18]
push 0
push edx
push eax
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x41ae4b
push 0
lea eax, [esp + 0x34]
push eax
push ebx
push dword [esp + 0x38]
mov ebx, dword [esp + 0x20]
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41ae35
mov ebx, dword [esp + 0x30]
test ebx, ebx
js 0x41ae5f
push ebx
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x24]
add esi, ebx
mov dword [ecx], eax
mov eax, dword [esp + 0x20]
add eax, ebx
mov dword [esp + 0x20], eax
cmp eax, dword [ebp + 0x1c]
jl 0x41ad92
test ebx, ebx
jle 0x41ad92
mov dword [esi + edi], 0
add esi, 4
push 4
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 2
push eax
mov eax, dword [ebp + 8]
push esi
push edi
push eax
mov ecx, dword [eax + 0x58]
call fcn.00416110
test eax, eax
jns 0x41adeb
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0xa7], 0
je 0x41adeb
mov eax, dword [ecx + 0x18]
mov byte [ecx + 0xa7], 0
mov dword [esp + 0x2c], eax
mov dword [ecx + 0x18], 0xffffffff
test eax, eax
js 0x41adeb
push 2
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [esp + 0x2c]
call dword [sym.imp.WS2_32.dll_closesocket]
test ebx, ebx
je 0x41ae00
mov ecx, dword [esp + 0x20]
add edi, esi
mov eax, dword [ebp + 0x1c]
cmp ecx, eax
jl 0x41aca0
mov ebx, dword [esp + 0x14]
cmp byte [esp + 0xe], 0
je 0x41ae15
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x41af0a
cmp byte [ebx + 0x34], 0
je 0x41af03
lea eax, [ebx + 0x18]
push eax
mov eax, dword [ebx + 0x2c]
call eax
jmp 0x41af0a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._file_sync_read:_ReadFile_err_dd_n
call fcn.00401410
add esp, 8
jmp 0x41ae63
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._file_sync_read:_SetFilePointerEx_err_d_n
call fcn.00401410
add esp, 8
mov ebx, dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0x20]
add eax, 0x2022
push str._ER_r_nErrno:__u_r_n_r_n
push eax
call fcn.00401480
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x1c]
push eax
mov eax, dword [ebp + 0xc]
push ecx
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push eax
push str._ReadFile___s__off_llu__len_d__err_d_n
call fcn.0040eaf0
add esp, 0x18
cmp byte [esp + 0xe], 0
je 0x41aeb1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x14]
test ebx, ebx
je 0x41aed1
cmp byte [ebx + 0x34], 0
je 0x41aeca
lea eax, [ebx + 0x18]
push eax
mov eax, dword [ebx + 0x2c]
call eax
jmp 0x41aed1
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x41aee0
mov ecx, eax
call fcn.00416b00
cmp dword [esp + 0x24], edi
jne 0x41aef7
mov ecx, dword [ebp + 8]
call fcn.004189f0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x41af19
mov ecx, eax
call fcn.00416b00
mov eax, dword [esp + 0x1c]
push ecx
mov ecx, dword [ebp + 8]
lea edx, [eax + 0x18]
mov dword [eax + 0xc], 1
call fcn.00416840
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18