Function at 0x402040
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x73a9af
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44
push ebx
push ebp
mov ebp, dword [esp + 0x5c]
push esi
push edi
mov ebx, ecx
push ebp
mov dword [esp + 0x18], ebx
call fcn.00444ad0
mov esi, dword [sym.imp.kernel32.dll_ReadFile]
xor edi, edi
lea eax, [esp + 0x10]
push edi
push eax
lea ecx, [esp + 0x24]
push 2
push ecx
push ebp
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], edi
call esi
lea edx, [esp + 0x10]
push edi
lea eax, [ebx + 0x58]
push edx
push 2
push eax
push ebp
call esi
or ebx, 0xffffffff
cmp word [esp + 0x1c], di
mov dword [esp + 0x24], edi
jle 0x402338
lea eax, [esp + 0x10]
push edi
push eax
lea ecx, [esp + 0x34]
push 4
push ecx
push ebp
xor esi, esi
call dword [sym.imp.kernel32.dll_ReadFile]
mov eax, dword [esp + 0x2c]
cmp eax, 0x10
ja case.0x4020d0.10
jmp dword [eax*4 + 0x402824]
push 0xbc
call fcn.00726f70
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], edi
je 0x402300
mov ecx, eax
call fcn.00401850
jmp 0x402302
push 0xfc
call fcn.00726f70
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 1
je 0x402300
mov ecx, eax
call fcn.0040afa0
jmp 0x402302
push 0xf8
call fcn.00726f70
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 2
je 0x402300
mov ecx, eax
call fcn.00411b20
jmp 0x402302
push 0xe8
call fcn.00726f70
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 3
je 0x402300
mov ecx, eax
call fcn.00404dd0
jmp 0x402302
push 0xc8
call fcn.00726f70
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 4
je 0x402300
mov ecx, eax
call fcn.00411760
jmp 0x402302
push 0xf0
call fcn.00726f70
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 5
je 0x402300
mov ecx, eax
call fcn.00410dc0
jmp 0x402302
push 0xcc
call fcn.00726f70
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 6
je 0x402300
mov ecx, eax
call fcn.004114c0
jmp 0x402302
push 0xd4
call fcn.00726f70
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 7
je 0x402300
mov ecx, eax
call fcn.004147d0
jmp 0x402302
push 0x108
call fcn.00726f70
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 8
je 0x402300
mov ecx, eax
call fcn.00406ab0
jmp 0x402302
push 0xc0
call fcn.00726f70
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 9
je 0x402300
mov ecx, eax
call fcn.00401000
jmp 0x402302
push 0x100
call fcn.00726f70
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 0xa
je 0x402300
mov ecx, eax
call fcn.0040deb0
jmp 0x402302
push 0xd4
call fcn.00726f70
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 0xb
je 0x402300
mov ecx, eax
call fcn.004150d0
jmp 0x402302
push 0xdc
call fcn.00726f70
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 0xc
je 0x402300
mov ecx, eax
call fcn.0040f7f0
jmp 0x402302
xor eax, eax
mov dword [esp + 0x5c], ebx
mov esi, eax
mov eax, dword [esp + 0x14]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x70]
mov edx, dword [esi]
push ebp
mov ecx, esi
call dword [edx + 0xc]
mov eax, dword [esp + 0x24]
movsx ecx, word [esp + 0x1c]
inc eax
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x4020ad
mov esi, dword [sym.imp.kernel32.dll_ReadFile]
lea edx, [esp + 0x10]
push edi
push edx
lea eax, [esp + 0x28]
push 4
push eax
push ebp
mov dword [esp + 0x34], edi
call esi
mov eax, dword [esp + 0x20]
cmp eax, edi
jle 0x402414
mov cl, byte [esp + 0x64]
lea esi, [eax + 1]
cmp esi, edi
mov byte [esp + 0x34], cl
mov eax, esi
jge 0x40236b
xor eax, eax
push eax
call fcn.00726f70
add esp, 4
mov ebx, eax
cmp esi, edi
mov dword [esp + 0x38], ebx
jbe 0x40238b
mov ecx, esi
cmp eax, edi
je 0x402387
mov byte [eax], 0
inc eax
dec ecx
jne 0x402380
lea eax, [ebx + esi]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x64]
lea edx, [esp + 0x10]
push 0
push edx
push eax
push ebx
push ecx
mov dword [esp + 0x70], 0xd
call dword [sym.imp.kernel32.dll_ReadFile]
mov edx, dword [esp + 0x14]
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
add edx, 0x2c
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
mov ecx, edx
push ebp
call fcn.00401450
test al, al
je 0x402401
mov eax, dword [esp + 0x14]
mov ecx, ebp
add eax, 0x2c
mov edx, ecx
mov esi, ebx
mov edi, dword [eax + 4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax + 4]
mov dword [eax + 8], ebp
add ebp, ecx
mov byte [ebp], 0
push ebx
mov dword [esp + 0x60], 0xffffffff
call fcn.00726ea6
add esp, 4
jmp 0x40245d
mov edi, 0x7c4d88
or ecx, 0xffffffff
xor eax, eax
mov esi, dword [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea ebx, [esi + 0x2c]
mov ebp, ecx
push 1
push ebp
mov ecx, ebx
call fcn.00401450
test al, al
je 0x402461
mov edi, dword [ebx + 4]
mov ecx, ebp
mov eax, ecx
mov esi, 0x7c4d88
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 8], ebp
mov ebx, dword [ebx + 4]
add ebx, ebp
mov byte [ebx], 0
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x64]
mov ebx, dword [sym.imp.kernel32.dll_ReadFile]
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esi + 0x88]
push 0x10
push edx
push edi
call ebx
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esi + 0x98]
push 0x10
push ecx
push edi
call ebx
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esi + 0x80]
push 4
push eax
push edi
call ebx
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esi + 0x84]
push 4
push edx
push edi
call ebx
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x30]
push 4
push ecx
push edi
call ebx
mov eax, dword [esp + 0x28]
test eax, eax
jle 0x4025a0
mov dl, byte [esp + 0x64]
lea esi, [eax + 1]
test esi, esi
mov byte [esp + 0x34], dl
mov eax, esi
jge 0x4024e7
xor eax, eax
push eax
call fcn.00726f70
add esp, 4
mov ebp, eax
test esi, esi
mov dword [esp + 0x38], ebp
jbe 0x402507
mov ecx, esi
test eax, eax
je 0x402503
mov byte [eax], 0
inc eax
dec ecx
jne 0x4024fc
lea eax, [esi + ebp]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x64]
lea eax, [esp + 0x10]
push 0
push eax
push ecx
push ebp
push edx
mov dword [esp + 0x70], 0xe
call dword [sym.imp.kernel32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov edi, ebp
or ecx, 0xffffffff
push 1
lea ebx, [eax + 0x3c]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x28], ecx
push ecx
mov ecx, ebx
call fcn.00401450
test al, al
je 0x40257b
mov eax, dword [esp + 0x24]
mov edi, dword [ebx + 4]
mov ecx, eax
mov esi, ebp
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 8], eax
mov ebx, dword [ebx + 4]
add ebx, eax
mov byte [ebx], 0
mov ecx, dword [esp + 0x14]
or eax, 0xffffffff
push ebp
mov dword [ecx + 0x4c], eax
mov dword [esp + 0x60], eax
call fcn.00726ea6
mov ebx, dword [sym.imp.kernel32.dll_ReadFile]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x68]
add esp, 4
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x20]
push 4
push eax
push edi
mov dword [esp + 0x2c], 0
call ebx
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x4026b8
mov cl, byte [esp + 0x64]
lea edi, [eax + 1]
test edi, edi
mov byte [esp + 0x44], cl
mov eax, edi
jge 0x4025d8
xor eax, eax
push eax
call fcn.00726f70
xor ebp, ebp
add esp, 4
mov esi, eax
cmp edi, ebp
mov dword [esp + 0x48], esi
jbe 0x4025fa
mov ecx, edi
cmp eax, ebp
je 0x4025f6
mov byte [eax], 0
inc eax
dec ecx
jne 0x4025ef
lea eax, [esi + edi]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x64]
lea edx, [esp + 0x10]
push ebp
push edx
push eax
mov ebx, 0xf
push esi
push ecx
mov dword [esp + 0x70], ebx
call dword [sym.imp.kernel32.dll_ReadFile]
mov dl, byte [esp + 0x64]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x34], dl
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
lea ecx, [esp + 0x3c]
call fcn.004047b0
mov ecx, dword [0x805a24]
lea eax, [esp + 0x34]
push ebp
push eax
mov byte [esp + 0x64], 0x10
call fcn.00458090
mov ecx, dword [esp + 0x14]
mov dword [ecx + 0xac], eax
mov eax, dword [esp + 0x38]
cmp eax, ebp
mov byte [esp + 0x5c], bl
je 0x402699
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x402690
cmp al, 0xff
je 0x402690
dec al
mov byte [ecx], al
jmp 0x402699
push ecx
call fcn.00726ea6
add esp, 4
push esi
mov dword [esp + 0x60], 0xffffffff
call fcn.00726ea6
mov ebx, dword [sym.imp.kernel32.dll_ReadFile]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x68]
add esp, 4
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x20]
push 4
push eax
push edi
call ebx
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x4027f3
mov cl, byte [esp + 0x64]
lea edi, [eax + 1]
test edi, edi
mov byte [esp + 0x44], cl
mov eax, edi
jge 0x4026e8
xor eax, eax
push eax
call fcn.00726f70
xor esi, esi
add esp, 4
mov ebp, eax
cmp edi, esi
mov dword [esp + 0x48], ebp
jbe 0x40270a
mov ecx, edi
cmp eax, esi
je 0x402706
mov byte [eax], 0
inc eax
dec ecx
jne 0x4026ff
lea eax, [edi + ebp]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x64]
lea edx, [esp + 0x10]
push esi
push edx
push eax
push ebp
push ecx
mov dword [esp + 0x70], 0x11
call dword [sym.imp.kernel32.dll_ReadFile]
mov dl, byte [esp + 0x64]
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x34], dl
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebx, ecx
lea ecx, [esp + 0x38]
push ebx
call fcn.00401450
test al, al
je 0x40278a
mov edi, dword [esp + 0x38]
mov ecx, ebx
mov eax, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x3c], ebx
xor esi, esi
mov byte [ecx + ebx], 0
mov ecx, dword [0x805a24]
lea edx, [esp + 0x34]
push esi
push edx
mov byte [esp + 0x64], 0x12
call fcn.00458090
mov ecx, dword [esp + 0x14]
mov dword [ecx + 0xb0], eax
mov eax, dword [esp + 0x38]
cmp eax, esi
mov byte [esp + 0x5c], 0x11
je 0x4027d4
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x4027cb
cmp al, 0xff
je 0x4027cb
dec al
mov byte [ecx], al
jmp 0x4027d4
push ecx
call fcn.00726ea6
add esp, 4
push ebp
mov dword [esp + 0x60], 0xffffffff
call fcn.00726ea6
mov ebx, dword [sym.imp.kernel32.dll_ReadFile]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x68]
add esp, 4
cmp word [esi + 0x58], 2
jl 0x40280a
lea edx, [esp + 0x10]
push 0
push edx
add esi, 0x5a
push 2
push esi
push edi
call ebx
mov ecx, dword [esp + 0x54]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x50
ret 4