Function at 0x402730
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x7b496f
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.0044a7c0
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 0x402a28
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.0x4027c0.10
jmp dword [eax*4 + 0x402f14]
push 0xbc
call fcn.007a2d8d
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], edi
je 0x4029f0
mov ecx, eax
call fcn.00401f40
jmp 0x4029f2
push 0xfc
call fcn.007a2d8d
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 1
je 0x4029f0
mov ecx, eax
call fcn.0040b830
jmp 0x4029f2
push 0x100
call fcn.007a2d8d
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 2
je 0x4029f0
mov ecx, eax
call fcn.004126c0
jmp 0x4029f2
push 0xe8
call fcn.007a2d8d
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 3
je 0x4029f0
mov ecx, eax
call fcn.004055a0
jmp 0x4029f2
push 0xc8
call fcn.007a2d8d
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 4
je 0x4029f0
mov ecx, eax
call fcn.004122a0
jmp 0x4029f2
push 0xf0
call fcn.007a2d8d
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 5
je 0x4029f0
mov ecx, eax
call fcn.00411840
jmp 0x4029f2
push 0xcc
call fcn.007a2d8d
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 6
je 0x4029f0
mov ecx, eax
call fcn.00411fa0
jmp 0x4029f2
push 0xd4
call fcn.007a2d8d
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 7
je 0x4029f0
mov ecx, eax
call fcn.00415660
jmp 0x4029f2
push 0x108
call fcn.007a2d8d
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 8
je 0x4029f0
mov ecx, eax
call fcn.004072e0
jmp 0x4029f2
push 0xc0
call fcn.007a2d8d
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 9
je 0x4029f0
mov ecx, eax
call fcn.00401000
jmp 0x4029f2
push 0x100
call fcn.007a2d8d
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 0xa
je 0x4029f0
mov ecx, eax
call fcn.0040e890
jmp 0x4029f2
push 0xd4
call fcn.007a2d8d
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 0xb
je 0x4029f0
mov ecx, eax
call fcn.00415fc0
jmp 0x4029f2
push 0xdc
call fcn.007a2d8d
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, edi
mov dword [esp + 0x5c], 0xc
je 0x4029f0
mov ecx, eax
call fcn.00410210
jmp 0x4029f2
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 0x40279d
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 0x402b04
mov cl, byte [esp + 0x64]
lea esi, [eax + 1]
cmp esi, edi
mov byte [esp + 0x34], cl
mov eax, esi
jge 0x402a5b
xor eax, eax
push eax
call fcn.007a2d8d
add esp, 4
mov ebx, eax
cmp esi, edi
mov dword [esp + 0x38], ebx
jbe 0x402a7b
mov ecx, esi
cmp eax, edi
je 0x402a77
mov byte [eax], 0
inc eax
dec ecx
jne 0x402a70
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.00401b40
test al, al
je 0x402af1
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.007a02e0
add esp, 4
jmp 0x402b4d
mov edi, 0x870c08
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.00401b40
test al, al
je 0x402b51
mov edi, dword [ebx + 4]
mov ecx, ebp
mov eax, ecx
mov esi, 0x870c08
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 0x402c90
mov dl, byte [esp + 0x64]
lea esi, [eax + 1]
test esi, esi
mov byte [esp + 0x34], dl
mov eax, esi
jge 0x402bd7
xor eax, eax
push eax
call fcn.007a2d8d
add esp, 4
mov ebp, eax
test esi, esi
mov dword [esp + 0x38], ebp
jbe 0x402bf7
mov ecx, esi
test eax, eax
je 0x402bf3
mov byte [eax], 0
inc eax
dec ecx
jne 0x402bec
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.00401b40
test al, al
je 0x402c6b
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.007a02e0
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 0x402da8
mov cl, byte [esp + 0x64]
lea edi, [eax + 1]
test edi, edi
mov byte [esp + 0x44], cl
mov eax, edi
jge 0x402cc8
xor eax, eax
push eax
call fcn.007a2d8d
xor ebp, ebp
add esp, 4
mov esi, eax
cmp edi, ebp
mov dword [esp + 0x48], esi
jbe 0x402cea
mov ecx, edi
cmp eax, ebp
je 0x402ce6
mov byte [eax], 0
inc eax
dec ecx
jne 0x402cdf
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.00404eb0
mov ecx, dword [0x8b1a48]
lea eax, [esp + 0x34]
push ebp
push eax
mov byte [esp + 0x64], 0x10
call fcn.0045e610
mov ecx, dword [esp + 0x14]
mov dword [ecx + 0xac], eax
mov eax, dword [esp + 0x38]
cmp eax, ebp
mov byte [esp + 0x5c], bl
je 0x402d89
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x402d80
cmp al, 0xff
je 0x402d80
dec al
mov byte [ecx], al
jmp 0x402d89
push ecx
call fcn.007a02e0
add esp, 4
push esi
mov dword [esp + 0x60], 0xffffffff
call fcn.007a02e0
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 0x402ee3
mov cl, byte [esp + 0x64]
lea edi, [eax + 1]
test edi, edi
mov byte [esp + 0x44], cl
mov eax, edi
jge 0x402dd8
xor eax, eax
push eax
call fcn.007a2d8d
xor esi, esi
add esp, 4
mov ebp, eax
cmp edi, esi
mov dword [esp + 0x48], ebp
jbe 0x402dfa
mov ecx, edi
cmp eax, esi
je 0x402df6
mov byte [eax], 0
inc eax
dec ecx
jne 0x402def
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.00401b40
test al, al
je 0x402e7a
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 [0x8b1a48]
lea edx, [esp + 0x34]
push esi
push edx
mov byte [esp + 0x64], 0x12
call fcn.0045e610
mov ecx, dword [esp + 0x14]
mov dword [ecx + 0xb0], eax
mov eax, dword [esp + 0x38]
cmp eax, esi
mov byte [esp + 0x5c], 0x11
je 0x402ec4
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x402ebb
cmp al, 0xff
je 0x402ebb
dec al
mov byte [ecx], al
jmp 0x402ec4
push ecx
call fcn.007a02e0
add esp, 4
push ebp
mov dword [esp + 0x60], 0xffffffff
call fcn.007a02e0
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 0x402efa
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