Function at 0x57959c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff114
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], eax
mov eax, 0x8210b8
call fcn.0066d220
mov edx, dword [ebp - 0x2c]
mov ecx, dword [edx + 0x2fc]
add ecx, 0x23c
mov dword [ebp - 0x94], ecx
mov eax, dword [ebp - 0x94]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jg 0x5795ec
mov ecx, dword [ebp - 0x28]
mov dword fs:[0], ecx
mov eax, ecx
jmp 0x57a1a1
lea edx, [ebp - 0xad4]
mov dword [ebp - 0x40], edx
push 0x830
push 0
push dword [ebp - 0x40]
call fcn.0066cc88
add esp, 0xc
mov eax, dword [ebp - 0x40]
xor edx, edx
mov dword [eax], edx
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ecx + 0x338]
mov edx, dword [eax]
call dword [edx + 0xc8]
mov ecx, dword [ebp - 0x40]
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x40]
xor edx, edx
mov dword [eax + 0x3c0], edx
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ecx + 0x33c]
mov edx, dword [eax]
call dword [edx + 0xc4]
test al, al
je 0x579651
mov dword [0x6eb9d4], 1
jmp 0x579659
xor ecx, ecx
mov dword [0x6eb9d4], ecx
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax + 0x2fc]
add edx, 0x23c
mov dword [ebp - 0x98], edx
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ecx + 0x2fc]
mov edx, dword [eax]
call dword [edx + 0xc8]
mov edx, eax
mov eax, dword [ebp - 0x98]
mov eax, dword [eax]
mov ecx, dword [eax]
call dword [ecx + 0x18]
push eax
mov edx, dword [ebp - 0x40]
add edx, 0xc
push edx
call fcn.0066ce08
add esp, 8
mov word [ebp - 0x18], 8
xor eax, eax
mov dword [ebp - 4], eax
lea edx, [ebp - 4]
inc dword [ebp - 0xc]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ecx + 0x2fc]
call fcn.0063a364
mov edx, dword [ebp - 4]
test edx, edx
je 0x5796c9
mov ecx, dword [ebp - 4]
jmp 0x5796ce
mov ecx, 0x82007c
push ecx
lea eax, [ebp - 0x1a0]
push eax
call fcn.0066ce08
add esp, 8
dec dword [ebp - 0xc]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0067d4bc
lea ecx, [ebp - 0x1a0]
mov dword [ebp - 0x38], ecx
jmp 0x5796fc
inc dword [ebp - 0x38]
mov eax, dword [ebp - 0x38]
movsx edx, byte [eax]
cmp edx, 0x28
jne 0x5796f9
push dword [ebp - 0x38]
lea ecx, [ebp - 0x2a4]
push ecx
call fcn.0066ce08
add esp, 8
inc dword [ebp - 0x38]
mov eax, dword [ebp - 0x38]
mov dl, byte [eax]
mov ecx, dword [ebp - 0x40]
mov byte [ecx + 0x214], dl
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x2c]
call fcn.00570ae8
lea ecx, [ebp - 0x2a4]
push ecx
mov eax, dword [ebp - 0x30]
push dword [eax*4 + 0x81f7d8]
push 0x4ea3
call fcn.00402b9c
pop ecx
push eax
lea edx, [ebp - 0x1a0]
push edx
call fcn.006712b0
add esp, 0x10
lea ecx, [ebp - 0x1a0]
push ecx
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462c64
add esp, 8
test eax, eax
jne 0x57978c
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
push 1
lea ecx, [ebp - 0xed4]
mov eax, dword [ebp - 0x40]
mov dl, byte [eax + 0x214]
mov eax, dword [ebp - 0x2c]
call fcn.00576940
test eax, eax
jne 0x5797b8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
push 1
call sub.KERNEL32.DLL_SetErrorMode
mov dword [ebp - 0x48], eax
push 0
push 0
push 3
push 0
push 3
push SysReAllocStringLen
mov ecx, dword [ebp - 0x40]
add ecx, 0xc
push ecx
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
cmp eax, 0xffffffff
jne 0x579867
call sub.KERNEL32.DLL_GetLastError
cmp eax, 5
jne 0x579812
push 0x5a86
call fcn.00402b9c
pop ecx
push eax
mov edx, dword [ebp - 0x40]
add edx, 0x2b8
push edx
call fcn.006712b0
add esp, 8
jmp 0x579836
call sub.KERNEL32.DLL_GetLastError
push eax
push 0x5aa4
call fcn.00402b9c
pop ecx
push eax
mov ecx, dword [ebp - 0x40]
add ecx, 0x2b8
push ecx
call fcn.006712b0
add esp, 0xc
mov eax, dword [ebp - 0x40]
add eax, 0x2b8
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462ac8
add esp, 8
push dword [ebp - 0x48]
call sub.KERNEL32.DLL_SetErrorMode
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
push 0
lea ecx, [ebp - 0x4c]
push ecx
push pe_nt_image_headers32
lea eax, [ebp - 0xcd4]
push eax
push dword [ebp - 0x44]
call sub.KERNEL32.DLL_ReadFile
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x579896
mov ecx, dword [ebp - 0x4c]
cmp ecx, 0x200
je 0x5798f3
call sub.KERNEL32.DLL_GetLastError
push eax
push 0x5aa9
call fcn.00402b9c
pop ecx
push eax
mov eax, dword [ebp - 0x40]
add eax, 0x2b8
push eax
call fcn.006712b0
add esp, 0xc
mov edx, dword [ebp - 0x40]
add edx, 0x2b8
push edx
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462ac8
add esp, 8
push dword [ebp - 0x44]
call sub.KERNEL32.DLL_CloseHandle
push dword [ebp - 0x48]
call sub.KERNEL32.DLL_SetErrorMode
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
push dword [ebp - 0x48]
call sub.KERNEL32.DLL_SetErrorMode
mov dword [ebp - 0x34], 1
mov cl, byte [ebp - 0xad6]
cmp cl, 0x55
jne 0x5799ae
mov al, byte [ebp - 0xad5]
cmp al, 0xaa
jne 0x5799ae
lea edx, [ebp - 0xb16]
mov dword [ebp - 0x50], edx
xor ecx, ecx
mov dword [ebp - 0x60], ecx
xor eax, eax
mov dword [ebp - 0x64], eax
xor edx, edx
mov dword [ebp - 0x5c], edx
mov ecx, dword [ebp - 0x5c]
shl ecx, 4
mov eax, dword [ebp - 0x50]
mov dl, byte [eax + ecx]
test dl, dl
je 0x57995f
mov ecx, dword [ebp - 0x5c]
shl ecx, 4
mov eax, dword [ebp - 0x50]
mov dl, byte [eax + ecx]
cmp dl, 0x80
je 0x57995f
xor ecx, ecx
mov dword [ebp - 0x34], ecx
jmp 0x5799ae
mov eax, dword [ebp - 0x5c]
shl eax, 4
mov edx, dword [ebp - 0x50]
mov ecx, dword [edx + eax + 0xc]
test ecx, ecx
je 0x5799a3
mov eax, dword [ebp - 0x5c]
shl eax, 4
mov edx, dword [ebp - 0x50]
add eax, edx
mov dword [ebp - 0x54], eax
inc dword [ebp - 0x60]
mov ecx, dword [ebp - 0x5c]
shl ecx, 4
mov eax, dword [ebp - 0x50]
mov dl, byte [eax + ecx]
cmp dl, 0x80
jne 0x5799a3
mov ecx, dword [ebp - 0x5c]
shl ecx, 4
mov eax, dword [ebp - 0x50]
add ecx, eax
mov dword [ebp - 0x58], ecx
inc dword [ebp - 0x64]
inc dword [ebp - 0x5c]
mov edx, dword [ebp - 0x5c]
cmp edx, 4
jl 0x579937
xor ecx, ecx
mov dword [ebp - 0x8c], ecx
push pe_nt_image_headers32
lea eax, [ebp - 0xed4]
push eax
lea edx, [ebp - 0xcd4]
push edx
call fcn.0066cf64
add esp, 0xc
test eax, eax
jne 0x5799e7
mov dword [ebp - 0x8c], 1
xor ecx, ecx
mov dword [ebp - 0x90], ecx
mov eax, dword [ebp - 0x8c]
test eax, eax
jne 0x579b1f
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x579a09
mov ecx, dword [ebp - 0x60]
test ecx, ecx
je 0x579a09
mov eax, dword [ebp - 0x64]
dec eax
jle 0x579a35
push 0x4e8e
call fcn.00402b9c
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462ac8
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
mov ecx, dword [ebp - 0x64]
dec ecx
jne 0x579a43
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x54], eax
jmp 0x579a75
mov edx, dword [ebp - 0x64]
dec edx
je 0x579a75
push 0x4e99
call fcn.00402b9c
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462ac8
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
mov ecx, dword [ebp - 0x54]
mov eax, dword [ecx + 8]
mov dword [ebp - 0x90], eax
xor edx, edx
mov dword [ebp - 0x34], edx
push dword [ebp - 0x90]
push dword [ebp - 0x44]
call fcn.005768f0
add esp, 8
test eax, eax
je 0x579ab8
push 0
lea ecx, [ebp - 0x4c]
push ecx
push pe_nt_image_headers32
lea eax, [ebp - 0xed4]
push eax
push dword [ebp - 0x44]
call sub.KERNEL32.DLL_ReadFile
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x579aca
mov ecx, dword [ebp - 0x4c]
cmp ecx, 0x200
je 0x579b1f
call sub.KERNEL32.DLL_GetLastError
push eax
push 0x5aa9
call fcn.00402b9c
pop ecx
push eax
mov eax, dword [ebp - 0x40]
add eax, 0x2b8
push eax
call fcn.006712b0
add esp, 0xc
mov edx, dword [ebp - 0x40]
add edx, 0x2b8
push edx
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462ac8
add esp, 8
push dword [ebp - 0x44]
call sub.KERNEL32.DLL_CloseHandle
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
push dword [ebp - 0x44]
call sub.KERNEL32.DLL_CloseHandle
lea ecx, [ebp - 0x78]
push ecx
lea eax, [ebp - 0x7c]
push eax
lea edx, [ebp - 0xed4]
push edx
call fcn.00518a28
add esp, 0xc
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
cmp ecx, 3
je 0x579b5f
mov eax, dword [ebp - 0x80]
cmp eax, 2
je 0x579b5f
mov edx, dword [ebp - 0x80]
dec edx
je 0x579b5f
mov ecx, dword [ebp - 0x80]
cmp ecx, 4
jne 0x579b67
mov eax, dword [ebp - 0x7c]
cmp eax, 1
jae 0x579ba5
push 0x4e9a
call fcn.00402b9c
pop ecx
push eax
push 0xa00988
call fcn.006712b0
add esp, 8
push 0xa00988
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462ac8
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
push dword [ebp - 0x30]
push dword [ebp - 0x80]
call fcn.0052d434
add esp, 8
test eax, eax
jne 0x579c09
mov ecx, dword [ebp - 0x80]
push dword [ecx*4 + 0x81f818]
mov eax, dword [ebp - 0x30]
push dword [eax*4 + 0x81f7d8]
push 0x4ea4
call fcn.00402b9c
pop ecx
push eax
push 0xa00988
call fcn.006712b0
add esp, 0x10
push 0xa00988
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462ac8
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
mov ecx, dword [0x80b150]
mov eax, dword [ebp - 0x90]
mov dword [ecx + 0x283b0], eax
mov edx, dword [0x82f528]
mov eax, dword [edx]
mov dx, 0xfff5
call fcn.0062cf04
mov ecx, dword [ebp - 0x30]
cmp ecx, 0xb
jne 0x579cfa
mov eax, dword [ebp - 0x40]
mov dl, byte [eax + 0x214]
push edx
call fcn.005297d4
pop ecx
test eax, eax
jne 0x579c99
mov ecx, dword [0x82f528]
mov eax, dword [ecx]
xor edx, edx
call fcn.0062cf04
push 0x4ea5
call fcn.00402b9c
pop ecx
push eax
push 0xa00988
call fcn.006712b0
add esp, 8
push 0xa00988
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462ac8
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
mov ecx, dword [ebp - 0x40]
mov al, byte [ecx + 0x214]
push eax
call fcn.00522948
pop ecx
test eax, eax
jne 0x579cfa
mov edx, dword [0x82f528]
mov eax, dword [edx]
xor edx, edx
call fcn.0062cf04
push 0x4ea5
call fcn.00402b9c
pop ecx
push eax
push 0xa00988
call fcn.006712b0
add esp, 8
push 0xa00988
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462ac8
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
push 0x8000
call fcn.0066c62c
pop ecx
mov dword [ebp - 0x84], eax
mov ecx, dword [ebp - 0x84]
test ecx, ecx
jne 0x579d61
mov eax, dword [0x82f528]
mov eax, dword [eax]
xor edx, edx
call fcn.0062cf04
push 0x59fa
call fcn.00402b9c
pop ecx
push eax
push 0xa00988
call fcn.006712b0
add esp, 8
push 0xa00988
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462ac8
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
push pe_nt_image_headers32
lea ecx, [ebp - 0xed4]
push ecx
push dword [ebp - 0x84]
call fcn.0066cc18
add esp, 0xc
push 0xffffffffffffffff
push dword [ebp - 0x30]
push dword [ebp - 0x80]
push dword [ebp - 0x84]
call fcn.00524584
add esp, 0x10
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
test eax, eax
jne 0x579de2
mov edx, dword [0x82f528]
mov eax, dword [edx]
xor edx, edx
call fcn.0062cf04
push 0x4ea6
call fcn.00402b9c
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462ac8
add esp, 8
push dword [ebp - 0x84]
call fcn.0066c63c
pop ecx
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
xor ecx, ecx
mov dword [ebp - 0x88], ecx
mov eax, dword [ebp - 0x68]
shr eax, 9
mov dword [ebp - 0x6c], eax
mov edx, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x7c]
cmp edx, ecx
jbe 0x579e94
mov eax, dword [ebp - 0x8c]
test eax, eax
jne 0x579e2c
push dword [ebp - 0x6c]
push dword [ebp - 0x80]
lea edx, [ebp - 0xed4]
push edx
push dword [ebp - 0x84]
call fcn.00524b50
add esp, 0x10
mov dword [ebp - 0x88], eax
mov ecx, dword [ebp - 0x88]
test ecx, ecx
jne 0x579e94
mov eax, dword [0x82f528]
mov eax, dword [eax]
xor edx, edx
call fcn.0062cf04
push dword [ebp - 0x6c]
push dword [ebp - 0x7c]
push 0x4ea7
call fcn.00402b9c
pop ecx
push eax
push 0xa00988
call fcn.006712b0
add esp, 0x10
push 0xa00988
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462ac8
add esp, 8
push dword [ebp - 0x84]
call fcn.0066c63c
pop ecx
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
mov ecx, dword [ebp - 0x30]
cmp ecx, 0xb
jne 0x579eee
push dword [ebp - 0x84]
call fcn.005228b4
pop ecx
test eax, eax
jne 0x579eee
mov eax, dword [0x82f528]
mov eax, dword [eax]
xor edx, edx
call fcn.0062cf04
push 0x4ea5
call fcn.00402b9c
pop ecx
push eax
push 0xa00988
call fcn.006712b0
add esp, 8
push dword [ebp - 0x84]
call fcn.0066c63c
pop ecx
mov ecx, dword [ebp - 0x28]
mov dword fs:[0], ecx
jmp 0x57a1a1
push 0x18
push 0
lea eax, [ebp - 0xeec]
push eax
call fcn.0066cc88
add esp, 0xc
lea edx, [ebp - 0xeec]
mov dword [0xd207bc], edx
push dword [ebp - 0x40]
call fcn.0056d3a0
pop ecx
test eax, eax
jne 0x579f61
mov ecx, dword [0x82f528]
mov eax, dword [ecx]
xor edx, edx
call fcn.0062cf04
push 0x4e93
call fcn.00402b9c
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462ac8
add esp, 8
push dword [ebp - 0x84]
call fcn.0066c63c
pop ecx
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x57a055
push 1
lea eax, [ebp - 0xed4]
push eax
push dword [ebp - 0x90]
push dword [ebp - 0x40]
call fcn.0056d9f8
add esp, 0x10
test eax, eax
je 0x579fdd
mov edx, dword [0x82f528]
mov eax, dword [edx]
xor edx, edx
call fcn.0062cf04
push 0x4ea1
call fcn.00402b9c
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462a84
add esp, 8
push dword [ebp - 0x40]
call fcn.0056d76c
pop ecx
push dword [ebp - 0x84]
call fcn.0066c63c
pop ecx
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
push dword [ebp - 0x6c]
push dword [ebp - 0x84]
mov ecx, dword [ebp - 0x90]
mov eax, dword [ebp - 0x6c]
sub ecx, eax
push ecx
push dword [ebp - 0x40]
call fcn.0056d9f8
add esp, 0x10
test eax, eax
je 0x57a0c3
mov edx, dword [0x82f528]
mov eax, dword [edx]
xor edx, edx
call fcn.0062cf04
push 0x4ea1
call fcn.00402b9c
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462a84
add esp, 8
push dword [ebp - 0x40]
call fcn.0056d76c
pop ecx
push dword [ebp - 0x84]
call fcn.0066c63c
pop ecx
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
push dword [ebp - 0x6c]
push dword [ebp - 0x84]
push dword [ebp - 0x90]
push dword [ebp - 0x40]
call fcn.0056d9f8
add esp, 0x10
test eax, eax
je 0x57a0c3
mov ecx, dword [0x82f528]
mov eax, dword [ecx]
xor edx, edx
call fcn.0062cf04
push 0x4ea1
call fcn.00402b9c
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462a84
add esp, 8
push dword [ebp - 0x40]
call fcn.0056d76c
pop ecx
push dword [ebp - 0x84]
call fcn.0066c63c
pop ecx
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
mov ecx, dword [ebp - 0x30]
cmp ecx, 0xb
jne 0x57a156
mov eax, dword [0x80b150]
mov dword [ebp - 0x9c], eax
mov edx, dword [ebp - 0x9c]
mov ecx, dword [ebp - 0x40]
mov dword [edx + 0x28340], ecx
mov eax, dword [ebp - 0x9c]
mov edx, dword [eax + 0x2839c]
test edx, edx
je 0x57a156
push dword [ebp - 0x9c]
call fcn.005227ac
pop ecx
test eax, eax
je 0x57a156
mov ecx, dword [0x82f528]
mov eax, dword [ecx]
xor edx, edx
call fcn.0062cf04
push 0x4ea1
call fcn.00402b9c
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462a84
add esp, 8
push dword [ebp - 0x40]
call fcn.0056d76c
pop ecx
push dword [ebp - 0x84]
call fcn.0066c63c
pop ecx
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x57a1a1
push dword [ebp - 0x40]
call fcn.0056d76c
pop ecx
push dword [ebp - 0x84]
call fcn.0066c63c
pop ecx
mov ecx, dword [0x82f528]
mov eax, dword [ecx]
xor edx, edx
call fcn.0062cf04
push 0x4ea2
call fcn.00402b9c
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640b4c
push eax
call fcn.00462ac8
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
mov esp, ebp
pop ebp
ret