Function at 0x41f6f0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x4c
xor eax, eax
push ebx
push ebp
push esi
mov esi, ecx
cmp dword [esi + 0x501928], 0x1f04
mov dword [esp + 0x24], eax
mov byte [esp + 0xf], al
mov dword [esi + 0x502d38], eax
sbb eax, eax
neg eax
sub eax, 1
push edi
mov edi, dword [esp + 0x64]
mov dword [esp + 0x24], eax
xor edx, edx
mov eax, edi
div dword [esi + 0x484]
add eax, 1
cmp eax, 4
mov dword [esp + 0x18], eax
jae 0x41ab48
jmp 0x41ab20
mov ecx, dword [esi + 0x484]
cmp ecx, 0x400
jb 0x41ab48
shr ecx, 1
xor edx, edx
mov eax, edi
div ecx
mov dword [esi + 0x484], ecx
add eax, 1
cmp eax, 4
mov dword [esp + 0x18], eax
jb 0x41ab20
mov eax, edi
xor edx, edx
div dword [esi + 0x484]
xor ebx, ebx
xor eax, eax
mov ecx, 4
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], ecx
lea ebp, [esi + 0x4d0]
lea edi, [esi + 0x5018d0]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x64], ecx
mov dword [esp + 0x38], edx
jmp 0x41ab90
mov ecx, dword [esi + 0x484]
mov edx, dword [esi + 0x501930]
push edi
lea eax, [esp + ebx + 0x50]
push eax
push ecx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
add edi, 0x14
add ebx, 4
add ebp, 0x100400
sub dword [esp + 0x64], 1
jne 0x41ab90
cmp dword [esp + 0x18], 0
jbe 0x41ae8c
lea esp, [esp]
xor al, al
mov byte [esp + 0x64], al
jmp 0x41abe0
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x14], ecx
jae 0x41ae7e
movsx edi, al
cmp dword [esp + edi*4 + 0x3c], 1
lea eax, [esp + edi*4 + 0x3c]
mov dword [esp + 0x30], eax
je 0x41ae5e
mov eax, dword [esi + 0x488]
lea edx, [edi + edi*4]
mov ecx, dword [esi + edx*4 + 0x5018e0]
lea ebp, [esi + edx*4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esi + 0x48c]
mov eax, dword [esi + 0x501930]
push edx
lea ebx, [esp + edi*4 + 0x50]
push ebx
add ebp, 0x5018d0
push ebp
push eax
mov dword [esp + 0x44], ebx
mov dword [esp + 0x3c], ebp
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov ecx, dword [ebx]
add dword [esi + 0x502d38], ecx
test eax, eax
mov dword [esp + 0x28], eax
je 0x41ae85
cmp dword [esp + 0x1c], 1
je 0x41aee5
mov eax, dword [esi + 0x484]
cmp eax, ecx
jne 0x41acd4
push eax
imul eax, dword [esp + 0x18]
imul edi, edi, 0x100400
add eax, dword [esp + 0x64]
lea edi, [edi + esi + 0x4d0]
push edi
push eax
call fcn.00452fc0
mov ecx, dword [esp + 0x2c]
mov eax, 1
add dword [esp + 0x20], eax
add esp, 0xc
cmp ecx, dword [esp + 0x18]
jae 0x41acc5
mov edx, dword [esi + 0x484]
mov eax, dword [esi + 0x501930]
push ebp
push ebx
push edx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
add dword [esp + 0x20], 1
jmp 0x41ae5e
mov ecx, dword [esp + 0x30]
sub dword [esp + 0x1c], eax
mov dword [ecx], eax
jmp 0x41ae5e
cmp byte [esp + 0x13], 1
jae 0x41af3f
mov cl, byte [esp + 0x64]
sub cl, 1
mov byte [esp + 0x12], cl
jns 0x41acf1
mov byte [esp + 0x12], 3
mov cl, byte [esp + 0x12]
sub cl, 1
jns 0x41acfc
mov cl, 3
mov edx, dword [esp + 0x1c]
sub edx, 2
je 0x41ada3
sub edx, 1
je 0x41ad3a
sub edx, 1
jne 0x41ae44
imul edi, edi, 0x100400
push ebp
push ebx
push eax
mov eax, dword [esi + 0x501930]
lea edx, [edi + esi + 0x4d0]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x41ae44
movsx ebp, byte [esp + 0x12]
lea ecx, [ebp + ebp*4]
lea edx, [esi + ecx*4 + 0x5018d0]
push edx
mov edx, ebp
imul edx, edx, 0x100400
lea ecx, [esp + ebp*4 + 0x50]
push ecx
mov ecx, dword [esi + 0x501930]
push eax
lea eax, [edx + esi + 0x4d0]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
imul edi, edi, 0x100400
mov edx, dword [esp + 0x2c]
mov eax, dword [esi + 0x484]
push edx
mov edx, dword [esi + 0x501930]
push ebx
push eax
lea ecx, [edi + esi + 0x4d0]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [esp + ebp*4 + 0x3c], 0
jmp 0x41ae44
movsx ebp, cl
lea ecx, [ebp + ebp*4]
lea edx, [esi + ecx*4 + 0x5018d0]
push edx
mov edx, ebp
imul edx, edx, 0x100400
lea ecx, [esp + ebp*4 + 0x50]
push ecx
mov ecx, dword [esi + 0x501930]
push eax
lea eax, [edx + esi + 0x4d0]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
movsx ebx, byte [esp + 0x12]
lea edx, [ebx + ebx*4]
lea eax, [esi + edx*4 + 0x5018d0]
mov edx, dword [esi + 0x484]
push eax
mov eax, ebx
imul eax, eax, 0x100400
lea ecx, [esp + ebx*4 + 0x50]
push ecx
push edx
mov edx, dword [esi + 0x501930]
lea ecx, [eax + esi + 0x4d0]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
imul edi, edi, 0x100400
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
mov edx, dword [esi + 0x484]
push eax
push ecx
mov ecx, dword [esi + 0x501930]
push edx
lea eax, [edi + esi + 0x4d0]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor eax, eax
mov dword [esp + ebp*4 + 0x3c], eax
mov dword [esp + ebx*4 + 0x3c], eax
add byte [esp + 0x13], 1
mov eax, 4
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], eax
mov al, byte [esp + 0x64]
add al, 1
cmp al, 4
mov byte [esp + 0x64], al
jl 0x41abe0
mov edx, dword [esp + 0x14]
cmp edx, dword [esp + 0x18]
jb 0x41abd0
cmp dword [esp + 0x28], 0
jne 0x41aed7
cmp byte [esp + 0x64], 4
jl 0x41ae91
mov byte [esp + 0x64], 0
mov bl, byte [esp + 0x64]
mov edi, 3
lea ebx, [ebx]
add bl, 1
cmp bl, 4
mov byte [esp + 0x64], bl
jl 0x41aeb1
mov byte [esp + 0x64], 0
mov bl, byte [esp + 0x64]
movsx eax, bl
cmp dword [esp + eax*4 + 0x3c], 0
jne 0x41aed2
lea eax, [eax + eax*4]
mov ecx, dword [esi + eax*4 + 0x5018e0]
push 0x14
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub edi, 1
jne 0x41aea0
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 8
movsx eax, byte [esp + 0x64]
mov ecx, dword [esp + 0x38]
xor edx, edx
cmp ecx, dword [esp + eax*4 + 0x4c]
sete dl
mov edi, edx
test edi, edi
mov dword [esp + 0x28], edi
je 0x41af2f
test ecx, ecx
je 0x41af2f
push ecx
imul eax, eax, 0x100400
mov ecx, dword [esp + 0x1c]
add ecx, 0xffffffff
imul ecx, dword [esi + 0x484]
add ecx, dword [esp + 0x64]
lea eax, [eax + esi + 0x4d0]
push eax
push ecx
call fcn.00452fc0
add esp, 0xc
xor edx, edx
test edi, edi
setne dl
mov dword [esp + 0x24], edx
jmp 0x41ae7e
mov dword [esp + 0x24], 0
jmp 0x41ae85
cmp dword [ecx + 0x501928], 0x1f20
jae 0x41f707
xor eax, eax
mov dword [esp + 8], eax
jmp 0x41aad0
mov eax, dword [esp + 8]
mov dword [esp + 8], eax
jmp 0x41aad0