Function at 0x579180
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, 0x8136e4
call fcn.0066ce04
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 0x5791d0
mov ecx, dword [ebp - 0x28]
mov dword fs:[0], ecx
mov eax, ecx
jmp 0x579d85
lea edx, [ebp - 0xad4]
mov dword [ebp - 0x40], edx
push 0x830
push 0
push dword [ebp - 0x40]
call fcn.0066c86c
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 0x579235
mov dword [0x6e710c], 1
jmp 0x57923d
xor ecx, ecx
mov dword [0x6e710c], 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.0066c9ec
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.00639f48
mov edx, dword [ebp - 4]
test edx, edx
je 0x5792ad
mov ecx, dword [ebp - 4]
jmp 0x5792b2
mov ecx, 0x8126a8
push ecx
lea eax, [ebp - 0x1a0]
push eax
call fcn.0066c9ec
add esp, 8
dec dword [ebp - 0xc]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0067d0a0
lea ecx, [ebp - 0x1a0]
mov dword [ebp - 0x38], ecx
jmp 0x5792e0
inc dword [ebp - 0x38]
mov eax, dword [ebp - 0x38]
movsx edx, byte [eax]
cmp edx, 0x28
jne 0x5792dd
push dword [ebp - 0x38]
lea ecx, [ebp - 0x2a4]
push ecx
call fcn.0066c9ec
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.005706cc
lea ecx, [ebp - 0x2a4]
push ecx
mov eax, dword [ebp - 0x30]
push dword [eax*4 + 0x811e04]
push 0x4ea3
call fcn.00402a64
pop ecx
push eax
lea edx, [ebp - 0x1a0]
push edx
call fcn.00670e94
add esp, 0x10
lea ecx, [ebp - 0x1a0]
push ecx
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.0046297c
add esp, 8
test eax, eax
jne 0x579370
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
push 1
lea ecx, [ebp - 0xed4]
mov eax, dword [ebp - 0x40]
mov dl, byte [eax + 0x214]
mov eax, dword [ebp - 0x2c]
call fcn.00576524
test eax, eax
jne 0x57939c
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
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 0x57944b
call sub.KERNEL32.DLL_GetLastError
cmp eax, 5
jne 0x5793f6
push 0x5a86
call fcn.00402a64
pop ecx
push eax
mov edx, dword [ebp - 0x40]
add edx, 0x2b8
push edx
call fcn.00670e94
add esp, 8
jmp 0x57941a
call sub.KERNEL32.DLL_GetLastError
push eax
push 0x5aa4
call fcn.00402a64
pop ecx
push eax
mov ecx, dword [ebp - 0x40]
add ecx, 0x2b8
push ecx
call fcn.00670e94
add esp, 0xc
mov eax, dword [ebp - 0x40]
add eax, 0x2b8
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.004627e0
add esp, 8
push dword [ebp - 0x48]
call sub.KERNEL32.DLL_SetErrorMode
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
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 0x57947a
mov ecx, dword [ebp - 0x4c]
cmp ecx, 0x200
je 0x5794d7
call sub.KERNEL32.DLL_GetLastError
push eax
push 0x5aa9
call fcn.00402a64
pop ecx
push eax
mov eax, dword [ebp - 0x40]
add eax, 0x2b8
push eax
call fcn.00670e94
add esp, 0xc
mov edx, dword [ebp - 0x40]
add edx, 0x2b8
push edx
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.004627e0
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 0x579d85
push dword [ebp - 0x48]
call sub.KERNEL32.DLL_SetErrorMode
mov dword [ebp - 0x34], 1
mov cl, byte [ebp - 0xad6]
cmp cl, 0x55
jne 0x579592
mov al, byte [ebp - 0xad5]
cmp al, 0xaa
jne 0x579592
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 0x579543
mov ecx, dword [ebp - 0x5c]
shl ecx, 4
mov eax, dword [ebp - 0x50]
mov dl, byte [eax + ecx]
cmp dl, 0x80
je 0x579543
xor ecx, ecx
mov dword [ebp - 0x34], ecx
jmp 0x579592
mov eax, dword [ebp - 0x5c]
shl eax, 4
mov edx, dword [ebp - 0x50]
mov ecx, dword [edx + eax + 0xc]
test ecx, ecx
je 0x579587
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 0x579587
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 0x57951b
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.0066cb48
add esp, 0xc
test eax, eax
jne 0x5795cb
mov dword [ebp - 0x8c], 1
xor ecx, ecx
mov dword [ebp - 0x90], ecx
mov eax, dword [ebp - 0x8c]
test eax, eax
jne 0x579703
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x5795ed
mov ecx, dword [ebp - 0x60]
test ecx, ecx
je 0x5795ed
mov eax, dword [ebp - 0x64]
dec eax
jle 0x579619
push 0x4e8e
call fcn.00402a64
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.004627e0
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
mov ecx, dword [ebp - 0x64]
dec ecx
jne 0x579627
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x54], eax
jmp 0x579659
mov edx, dword [ebp - 0x64]
dec edx
je 0x579659
push 0x4e99
call fcn.00402a64
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.004627e0
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
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.005764d4
add esp, 8
test eax, eax
je 0x57969c
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 0x5796ae
mov ecx, dword [ebp - 0x4c]
cmp ecx, 0x200
je 0x579703
call sub.KERNEL32.DLL_GetLastError
push eax
push 0x5aa9
call fcn.00402a64
pop ecx
push eax
mov eax, dword [ebp - 0x40]
add eax, 0x2b8
push eax
call fcn.00670e94
add esp, 0xc
mov edx, dword [ebp - 0x40]
add edx, 0x2b8
push edx
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.004627e0
add esp, 8
push dword [ebp - 0x44]
call sub.KERNEL32.DLL_CloseHandle
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
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.0051860c
add esp, 0xc
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
cmp ecx, 3
je 0x579743
mov eax, dword [ebp - 0x80]
cmp eax, 2
je 0x579743
mov edx, dword [ebp - 0x80]
dec edx
je 0x579743
mov ecx, dword [ebp - 0x80]
cmp ecx, 4
jne 0x57974b
mov eax, dword [ebp - 0x7c]
cmp eax, 1
jae 0x579789
push 0x4e9a
call fcn.00402a64
pop ecx
push eax
push 0x9f2fb4
call fcn.00670e94
add esp, 8
push 0x9f2fb4
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.004627e0
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
push dword [ebp - 0x30]
push dword [ebp - 0x80]
call fcn.0052d018
add esp, 8
test eax, eax
jne 0x5797ed
mov ecx, dword [ebp - 0x80]
push dword [ecx*4 + 0x811e44]
mov eax, dword [ebp - 0x30]
push dword [eax*4 + 0x811e04]
push 0x4ea4
call fcn.00402a64
pop ecx
push eax
push 0x9f2fb4
call fcn.00670e94
add esp, 0x10
push 0x9f2fb4
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.004627e0
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
mov ecx, dword [0x7fd77c]
mov eax, dword [ebp - 0x90]
mov dword [ecx + 0x283b0], eax
mov edx, dword [0x821b54]
mov eax, dword [edx]
mov dx, 0xfff5
call fcn.0062cae8
mov ecx, dword [ebp - 0x30]
cmp ecx, 0xb
jne 0x5798de
mov eax, dword [ebp - 0x40]
mov dl, byte [eax + 0x214]
push edx
call fcn.005293b8
pop ecx
test eax, eax
jne 0x57987d
mov ecx, dword [0x821b54]
mov eax, dword [ecx]
xor edx, edx
call fcn.0062cae8
push 0x4ea5
call fcn.00402a64
pop ecx
push eax
push 0x9f2fb4
call fcn.00670e94
add esp, 8
push 0x9f2fb4
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.004627e0
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
mov ecx, dword [ebp - 0x40]
mov al, byte [ecx + 0x214]
push eax
call fcn.0052252c
pop ecx
test eax, eax
jne 0x5798de
mov edx, dword [0x821b54]
mov eax, dword [edx]
xor edx, edx
call fcn.0062cae8
push 0x4ea5
call fcn.00402a64
pop ecx
push eax
push 0x9f2fb4
call fcn.00670e94
add esp, 8
push 0x9f2fb4
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.004627e0
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
push 0x8000
call fcn.0066c210
pop ecx
mov dword [ebp - 0x84], eax
mov ecx, dword [ebp - 0x84]
test ecx, ecx
jne 0x579945
mov eax, dword [0x821b54]
mov eax, dword [eax]
xor edx, edx
call fcn.0062cae8
push 0x59fa
call fcn.00402a64
pop ecx
push eax
push 0x9f2fb4
call fcn.00670e94
add esp, 8
push 0x9f2fb4
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.004627e0
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
push pe_nt_image_headers32
lea ecx, [ebp - 0xed4]
push ecx
push dword [ebp - 0x84]
call fcn.0066c7fc
add esp, 0xc
push 0xffffffffffffffff
push dword [ebp - 0x30]
push dword [ebp - 0x80]
push dword [ebp - 0x84]
call fcn.00524168
add esp, 0x10
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
test eax, eax
jne 0x5799c6
mov edx, dword [0x821b54]
mov eax, dword [edx]
xor edx, edx
call fcn.0062cae8
push 0x4ea6
call fcn.00402a64
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.004627e0
add esp, 8
push dword [ebp - 0x84]
call fcn.0066c220
pop ecx
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
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 0x579a78
mov eax, dword [ebp - 0x8c]
test eax, eax
jne 0x579a10
push dword [ebp - 0x6c]
push dword [ebp - 0x80]
lea edx, [ebp - 0xed4]
push edx
push dword [ebp - 0x84]
call fcn.00524734
add esp, 0x10
mov dword [ebp - 0x88], eax
mov ecx, dword [ebp - 0x88]
test ecx, ecx
jne 0x579a78
mov eax, dword [0x821b54]
mov eax, dword [eax]
xor edx, edx
call fcn.0062cae8
push dword [ebp - 0x6c]
push dword [ebp - 0x7c]
push 0x4ea7
call fcn.00402a64
pop ecx
push eax
push 0x9f2fb4
call fcn.00670e94
add esp, 0x10
push 0x9f2fb4
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.004627e0
add esp, 8
push dword [ebp - 0x84]
call fcn.0066c220
pop ecx
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
mov ecx, dword [ebp - 0x30]
cmp ecx, 0xb
jne 0x579ad2
push dword [ebp - 0x84]
call fcn.00522498
pop ecx
test eax, eax
jne 0x579ad2
mov eax, dword [0x821b54]
mov eax, dword [eax]
xor edx, edx
call fcn.0062cae8
push 0x4ea5
call fcn.00402a64
pop ecx
push eax
push 0x9f2fb4
call fcn.00670e94
add esp, 8
push dword [ebp - 0x84]
call fcn.0066c220
pop ecx
mov ecx, dword [ebp - 0x28]
mov dword fs:[0], ecx
jmp 0x579d85
push 0x18
push 0
lea eax, [ebp - 0xeec]
push eax
call fcn.0066c86c
add esp, 0xc
lea edx, [ebp - 0xeec]
mov dword [0xd12de8], edx
push dword [ebp - 0x40]
call fcn.0056cf84
pop ecx
test eax, eax
jne 0x579b45
mov ecx, dword [0x821b54]
mov eax, dword [ecx]
xor edx, edx
call fcn.0062cae8
push 0x4e93
call fcn.00402a64
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.004627e0
add esp, 8
push dword [ebp - 0x84]
call fcn.0066c220
pop ecx
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x579c39
push 1
lea eax, [ebp - 0xed4]
push eax
push dword [ebp - 0x90]
push dword [ebp - 0x40]
call fcn.0056d5dc
add esp, 0x10
test eax, eax
je 0x579bc1
mov edx, dword [0x821b54]
mov eax, dword [edx]
xor edx, edx
call fcn.0062cae8
push 0x4ea1
call fcn.00402a64
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.0046279c
add esp, 8
push dword [ebp - 0x40]
call fcn.0056d350
pop ecx
push dword [ebp - 0x84]
call fcn.0066c220
pop ecx
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
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.0056d5dc
add esp, 0x10
test eax, eax
je 0x579ca7
mov edx, dword [0x821b54]
mov eax, dword [edx]
xor edx, edx
call fcn.0062cae8
push 0x4ea1
call fcn.00402a64
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.0046279c
add esp, 8
push dword [ebp - 0x40]
call fcn.0056d350
pop ecx
push dword [ebp - 0x84]
call fcn.0066c220
pop ecx
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
push dword [ebp - 0x6c]
push dword [ebp - 0x84]
push dword [ebp - 0x90]
push dword [ebp - 0x40]
call fcn.0056d5dc
add esp, 0x10
test eax, eax
je 0x579ca7
mov ecx, dword [0x821b54]
mov eax, dword [ecx]
xor edx, edx
call fcn.0062cae8
push 0x4ea1
call fcn.00402a64
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.0046279c
add esp, 8
push dword [ebp - 0x40]
call fcn.0056d350
pop ecx
push dword [ebp - 0x84]
call fcn.0066c220
pop ecx
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
mov ecx, dword [ebp - 0x30]
cmp ecx, 0xb
jne 0x579d3a
mov eax, dword [0x7fd77c]
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 0x579d3a
push dword [ebp - 0x9c]
call fcn.00522390
pop ecx
test eax, eax
je 0x579d3a
mov ecx, dword [0x821b54]
mov eax, dword [ecx]
xor edx, edx
call fcn.0062cae8
push 0x4ea1
call fcn.00402a64
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.0046279c
add esp, 8
push dword [ebp - 0x40]
call fcn.0056d350
pop ecx
push dword [ebp - 0x84]
call fcn.0066c220
pop ecx
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x579d85
push dword [ebp - 0x40]
call fcn.0056d350
pop ecx
push dword [ebp - 0x84]
call fcn.0066c220
pop ecx
mov ecx, dword [0x821b54]
mov eax, dword [ecx]
xor edx, edx
call fcn.0062cae8
push 0x4ea2
call fcn.00402a64
pop ecx
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00640730
push eax
call fcn.004627e0
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
mov esp, ebp
pop ebp
ret