Function at 0x41f4b0
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
dec eax
push edi
mov edi, dword [esp + 0x64]
mov dword [esp + 0x24], eax
xor edx, edx
mov eax, edi
div dword [esi + 0x484]
inc eax
mov dword [esp + 0x18], eax
cmp eax, 4
jae 0x41a9e6
jmp 0x41a9c0
mov ecx, dword [esi + 0x484]
cmp ecx, 0x400
jb 0x41a9e6
shr ecx, 1
xor edx, edx
mov eax, edi
div ecx
mov dword [esi + 0x484], ecx
inc eax
mov dword [esp + 0x18], eax
cmp eax, 4
jb 0x41a9c0
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
lea esp, [esp]
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 0x41aa30
cmp dword [esp + 0x18], 0
jbe 0x41ad2a
lea esp, [esp]
xor al, al
mov byte [esp + 0x64], al
jmp 0x41aa80
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x14], ecx
jae 0x41ad1c
movsx edi, al
cmp dword [esp + edi*4 + 0x3c], 1
lea eax, [esp + edi*4 + 0x3c]
mov dword [esp + 0x30], eax
je 0x41acfc
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
mov dword [esp + 0x28], eax
test eax, eax
je 0x41ad23
cmp dword [esp + 0x1c], 1
je 0x41ad84
mov eax, dword [esi + 0x484]
cmp eax, ecx
jne 0x41ab73
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.00455a00
mov ecx, dword [esp + 0x2c]
mov eax, 1
add dword [esp + 0x20], eax
add esp, 0xc
cmp ecx, dword [esp + 0x18]
jae 0x41ab64
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]
inc dword [esp + 0x20]
jmp 0x41acfc
mov ecx, dword [esp + 0x30]
sub dword [esp + 0x1c], eax
mov dword [ecx], eax
jmp 0x41acfc
cmp byte [esp + 0x13], 1
jae 0x41addc
mov cl, byte [esp + 0x64]
sub cl, 1
mov byte [esp + 0x12], cl
jns 0x41ab90
mov byte [esp + 0x12], 3
mov cl, byte [esp + 0x12]
sub cl, 1
jns 0x41ab9b
mov cl, 3
mov edx, dword [esp + 0x1c]
sub edx, 2
je 0x41ac42
sub edx, 1
je 0x41abd9
sub edx, 1
jne 0x41ace3
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 0x41ace3
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 0x41ace3
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
inc byte [esp + 0x13]
mov eax, 4
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], eax
mov al, byte [esp + 0x64]
inc al
cmp al, 4
mov byte [esp + 0x64], al
jl 0x41aa80
mov edx, dword [esp + 0x14]
cmp edx, dword [esp + 0x18]
jb 0x41aa70
cmp dword [esp + 0x28], 0
jne 0x41ad76
cmp byte [esp + 0x64], 4
jl 0x41ad2f
mov byte [esp + 0x64], 0
mov bl, byte [esp + 0x64]
mov edi, 3
jmp 0x41ad40
inc bl
cmp bl, 4
mov byte [esp + 0x64], bl
jl 0x41ad50
mov byte [esp + 0x64], 0
mov bl, byte [esp + 0x64]
movsx eax, bl
cmp dword [esp + eax*4 + 0x3c], 0
jne 0x41ad71
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 0x41ad40
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
mov dword [esp + 0x28], edi
test edi, edi
je 0x41adcc
test ecx, ecx
je 0x41adcc
push ecx
imul eax, eax, 0x100400
mov ecx, dword [esp + 0x1c]
dec ecx
imul ecx, dword [esi + 0x484]
add ecx, dword [esp + 0x64]
lea eax, [eax + esi + 0x4d0]
push eax
push ecx
call fcn.00455a00
add esp, 0xc
xor edx, edx
test edi, edi
setne dl
mov dword [esp + 0x24], edx
jmp 0x41ad1c
mov dword [esp + 0x24], 0
jmp 0x41ad23
cmp dword [ecx + 0x501928], 0x1f20
jae 0x41f4c7
xor eax, eax
mov dword [esp + 8], eax
jmp 0x41a970
mov eax, dword [esp + 8]
mov dword [esp + 8], eax
jmp 0x41a970