Function at 0x40e4d0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x5c
test ebx, ebx
mov dword [esp], 0
jne 0x40e4e5
lea eax, [ebx - 0x66]
add esp, 0x5c
ret
mov eax, dword [ebx + 0x14]
add eax, dword [ebx + 0xc]
mov ecx, dword [ebx]
push ebp
push esi
push edi
push 0
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
or ebp, 0xffffffff
cmp eax, ebp
jne 0x40e509
mov dword [esp + 0xc], ebp
jmp 0x40e534
mov edi, dword [ebx]
lea eax, [esp + 0x10]
push eax
call fcn.0040e2d0
add esp, 4
test eax, eax
je 0x40e522
mov dword [esp + 0xc], ebp
jmp 0x40e534
cmp dword [esp + 0x10], 0x2014b50
je 0x40e534
mov dword [esp + 0xc], 0xffffff99
mov edi, dword [ebx]
lea ecx, [esp + 0x18]
push ecx
call fcn.0040e260
add esp, 4
test eax, eax
je 0x40e54b
mov dword [esp + 0xc], ebp
mov edi, dword [ebx]
lea edx, [esp + 0x1c]
push edx
call fcn.0040e260
add esp, 4
test eax, eax
je 0x40e562
mov dword [esp + 0xc], ebp
mov edi, dword [ebx]
lea eax, [esp + 0x20]
push eax
call fcn.0040e260
add esp, 4
test eax, eax
je 0x40e579
mov dword [esp + 0xc], ebp
mov edi, dword [ebx]
lea ecx, [esp + 0x24]
push ecx
call fcn.0040e260
add esp, 4
test eax, eax
je 0x40e590
mov dword [esp + 0xc], ebp
mov edi, dword [ebx]
lea edx, [esp + 0x28]
push edx
call fcn.0040e2d0
add esp, 4
test eax, eax
je 0x40e5a7
mov dword [esp + 0xc], ebp
mov ecx, dword [esp + 0x28]
mov edi, dword [ebx]
mov eax, ecx
shr eax, 0x10
mov edx, eax
and edx, 0x1f
mov dword [esp + 0x5c], edx
mov edx, eax
shr eax, 9
and eax, 0x7f
shr edx, 5
add eax, 0x7bc
and edx, 0xf
mov dword [esp + 0x64], eax
sub edx, 1
mov eax, ecx
mov dword [esp + 0x60], edx
shr eax, 0xb
mov edx, ecx
and eax, 0x1f
mov dword [esp + 0x58], eax
shr edx, 5
and ecx, 0x1f
lea eax, [esp + 0x2c]
and edx, 0x3f
add ecx, ecx
push eax
mov dword [esp + 0x58], edx
mov dword [esp + 0x54], ecx
call fcn.0040e2d0
add esp, 4
test eax, eax
je 0x40e60f
mov dword [esp + 0xc], ebp
mov edi, dword [ebx]
lea ecx, [esp + 0x30]
push ecx
call fcn.0040e2d0
add esp, 4
test eax, eax
je 0x40e626
mov dword [esp + 0xc], ebp
mov edi, dword [ebx]
lea edx, [esp + 0x34]
push edx
call fcn.0040e2d0
add esp, 4
test eax, eax
je 0x40e63d
mov dword [esp + 0xc], ebp
mov edi, dword [ebx]
lea eax, [esp + 0x38]
push eax
call fcn.0040e260
add esp, 4
test eax, eax
je 0x40e654
mov dword [esp + 0xc], ebp
mov edi, dword [ebx]
lea ecx, [esp + 0x3c]
push ecx
call fcn.0040e260
add esp, 4
test eax, eax
je 0x40e66b
mov dword [esp + 0xc], ebp
mov edi, dword [ebx]
lea edx, [esp + 0x40]
push edx
call fcn.0040e260
add esp, 4
test eax, eax
je 0x40e682
mov dword [esp + 0xc], ebp
mov edi, dword [ebx]
lea eax, [esp + 0x44]
push eax
call fcn.0040e260
add esp, 4
test eax, eax
je 0x40e699
mov dword [esp + 0xc], ebp
mov edi, dword [ebx]
lea ecx, [esp + 0x48]
push ecx
call fcn.0040e260
add esp, 4
test eax, eax
je 0x40e6b0
mov dword [esp + 0xc], ebp
mov edi, dword [ebx]
lea edx, [esp + 0x4c]
push edx
call fcn.0040e2d0
add esp, 4
test eax, eax
je 0x40e6c7
mov dword [esp + 0xc], ebp
mov edi, dword [ebx]
lea eax, [esp + 0x14]
push eax
call fcn.0040e2d0
add esp, 4
test eax, eax
je 0x40e6de
mov dword [esp + 0xc], ebp
cmp dword [esp + 0xc], 0
mov esi, dword [esp + 0x38]
jne 0x40e7c9
mov eax, dword [esp + 0x74]
test eax, eax
je 0x40e747
mov ecx, dword [esp + 0x78]
cmp esi, ecx
jae 0x40e705
mov byte [esi + eax], 0
mov edi, esi
jmp 0x40e707
mov edi, ecx
test esi, esi
jbe 0x40e73a
test ecx, ecx
jbe 0x40e73a
test edi, edi
je 0x40e736
mov edx, dword [ebx]
push 0
lea ecx, [esp + 0x14]
push ecx
push edi
push eax
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40e736
xor edx, edx
div edi
cmp eax, 1
je 0x40e73a
mov dword [esp + 0xc], ebp
sub esi, edi
cmp dword [esp + 0xc], 0
jne 0x40e7c9
cmp dword [esp + 0x7c], 0
je 0x40e7c9
mov ebp, dword [esp + 0x3c]
mov edi, dword [esp + 0x80]
cmp ebp, edi
jae 0x40e75f
mov edi, ebp
test esi, esi
je 0x40e782
mov eax, dword [ebx]
push 1
push 0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x40e77a
xor esi, esi
jmp 0x40e782
mov dword [esp + 0xc], 0xffffffff
test ebp, ebp
jbe 0x40e7c3
cmp dword [esp + 0x80], 0
jbe 0x40e7c3
test edi, edi
je 0x40e7bb
mov ecx, dword [esp + 0x7c]
mov edx, dword [ebx]
push 0
lea eax, [esp + 0x14]
push eax
push edi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40e7bb
xor edx, edx
div edi
cmp eax, 1
je 0x40e7c3
mov dword [esp + 0xc], 0xffffffff
sub ebp, edi
add esi, ebp
jmp 0x40e7cd
add esi, dword [esp + 0x3c]
cmp dword [esp + 0xc], 0
jne 0x40e88e
mov eax, dword [esp + 0x84]
test eax, eax
je 0x40e86d
mov ebp, dword [esp + 0x40]
mov edi, dword [esp + 0x88]
cmp ebp, edi
jae 0x40e7fc
mov byte [eax + ebp], 0
mov edi, ebp
test esi, esi
je 0x40e817
mov eax, dword [ebx]
push 1
push 0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40e817
mov dword [esp + 0xc], eax
test ebp, ebp
jbe 0x40e866
cmp dword [esp + 0x88], 0
jbe 0x40e866
test edi, edi
je 0x40e853
mov ecx, dword [esp + 0x84]
mov edx, dword [ebx]
push 0
lea eax, [esp + 0x14]
push eax
push edi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40e853
xor edx, edx
div edi
cmp eax, 1
je 0x40e866
pop edi
mov dword [esp + 8], 0xffffffff
mov eax, dword [esp + 8]
pop esi
pop ebp
add esp, 0x5c
ret
cmp dword [esp + 0xc], 0
jne 0x40e88e
mov edi, dword [esp + 0x6c]
test edi, edi
je 0x40e880
mov ecx, 0x14
lea esi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x70]
test eax, eax
je 0x40e88e
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebp
add esp, 0x5c
ret