Function at 0x516846
Capabilities:
Read file on windows

Disassembly:
push 0x6c
mov eax, 0x577402
call fcn.005509df
mov ebx, ecx
mov dword [ebp - 0x10], ebx
xor eax, eax
push eax
push 0x80
push 3
pop ecx
push ecx
push eax
mov dword [ebp - 0x28], eax
inc eax
push eax
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x2c], esi
cmp esi, 0xffffffff
jne 0x516888
xor eax, eax
jmp 0x516fe6
push 0
lea eax, [ebp - 0x28]
push eax
push 4
lea edi, [ebx + 4]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x516881
push 0
lea ecx, [ebp - 0x28]
push ecx
push 4
lea eax, [ebx + 8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x516881
mov esi, dword [ebx + 8]
xor ecx, ecx
imul esi, dword [edi]
push 0x2c
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.0054b016
pop ecx
mov dword [ebp - 0x78], eax
and dword [ebp - 4], 0
test eax, eax
je 0x51690c
push fcn.00513fff
push 0x513fc5
push esi
push 0x2c
pop ecx
mov dword [eax], esi
add eax, 4
push ecx
push eax
mov dword [ebp + 8], eax
call fcn.00553df4
mov eax, dword [ebp + 8]
jmp 0x51690e
xor eax, eax
or dword [ebp - 4], 0xffffffff
xor esi, esi
mov dword [ebx + 0xc], eax
mov dword [ebp + 8], esi
cmp dword [ebx + 8], esi
jbe 0x516984
xor edi, edi
cmp dword [ebx + 4], edi
jbe 0x516978
push 0
lea eax, [ebp - 0x28]
push eax
push 2
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x516881
mov eax, dword [ebx + 4]
imul eax, esi
add eax, edi
imul esi, eax, 0x2c
add esi, dword [ebx + 0xc]
je 0x51696f
mov eax, dword [esi]
mov ecx, esi
push edi
call dword [eax + 0x10]
mov eax, dword [esi]
mov ecx, esi
push dword [ebp + 8]
call dword [eax + 0x18]
push dword [ebp - 0x60]
mov ecx, esi
call fcn.00434e3f
mov esi, dword [ebp + 8]
inc edi
cmp edi, dword [ebx + 4]
jb 0x516926
inc esi
mov dword [ebp + 8], esi
cmp esi, dword [ebx + 8]
jb 0x51691f
lea edi, [ebx + 4]
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0xc]
xor edx, edx
mov eax, dword [edi]
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x2c], ecx
push 3
pop ecx
div ecx
mov esi, dword [ebx + 8]
xor edx, edx
mov ecx, eax
mov dword [ebx + 0x14], esi
push 3
mov eax, esi
mov dword [ebx + 0x18], ecx
pop esi
div esi
push 0x2c
mov esi, eax
mov dword [ebx + 0x1c], esi
imul esi, ecx
xor ecx, ecx
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.0054b016
pop ecx
mov dword [ebp - 0x78], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x516a0e
push fcn.00513fff
push 0x513fc5
push esi
push 0x2c
pop ecx
mov dword [eax], esi
add eax, 4
push ecx
push eax
mov dword [ebp + 8], eax
call fcn.00553df4
mov eax, dword [ebp + 8]
jmp 0x516a10
xor eax, eax
or dword [ebp - 4], 0xffffffff
xor esi, esi
mov dword [ebx + 0x30], eax
mov dword [ebp + 8], esi
cmp dword [ebx + 0x1c], esi
jbe 0x516c33
xor eax, eax
push 3
mov dword [ebp - 0x18], eax
pop ecx
and dword [ebp - 0x1c], 0
cmp dword [ebx + 0x18], 0
jbe 0x516c1e
lea ecx, [eax + 2]
mov dword [ebp - 0x2c], ecx
dec ecx
push 2
mov dword [ebp - 0x24], ecx
pop ecx
mov dword [ebp - 0x14], ecx
lea edi, [ecx - 2]
mov ecx, ebx
push eax
push edi
call fcn.005163dc
mov esi, dword [ebp - 0x14]
mov ecx, ebx
push dword [ebp - 0x18]
dec esi
mov dword [ebp - 0x5c], eax
push esi
call fcn.005163dc
push dword [ebp - 0x18]
mov ecx, ebx
mov dword [ebp - 0x58], eax
push dword [ebp - 0x14]
call fcn.005163dc
push dword [ebp - 0x24]
mov ecx, ebx
mov dword [ebp - 0x54], eax
push edi
call fcn.005163dc
push dword [ebp - 0x24]
mov ecx, ebx
mov dword [ebp - 0x20], eax
push esi
call fcn.005163dc
push dword [ebp - 0x24]
mov ecx, ebx
mov dword [ebp - 0x30], eax
push dword [ebp - 0x14]
call fcn.005163dc
push dword [ebp - 0x2c]
mov ecx, ebx
mov dword [ebp - 0x34], eax
push edi
call fcn.005163dc
mov edi, dword [ebp - 0x2c]
mov ecx, ebx
push edi
push esi
mov dword [ebp - 0x38], eax
call fcn.005163dc
push edi
push dword [ebp - 0x14]
mov ecx, ebx
mov dword [ebp - 0x3c], eax
call fcn.005163dc
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x50], eax
test ecx, ecx
je 0x516bfb
mov esi, dword [ebp - 0x58]
test esi, esi
je 0x516bfb
mov edi, dword [ebp - 0x54]
test edi, edi
je 0x516bfb
cmp dword [ebp - 0x20], 0
je 0x516bfb
cmp dword [ebp - 0x30], 0
je 0x516bfb
cmp dword [ebp - 0x34], 0
je 0x516bfb
cmp dword [ebp - 0x38], 0
je 0x516bfb
cmp dword [ebp - 0x3c], 0
je 0x516bfb
test eax, eax
je 0x516bfb
call fcn.005126fe
test eax, eax
jne 0x516bef
mov ecx, esi
call fcn.005126fe
test eax, eax
jne 0x516bef
mov ecx, edi
call fcn.005126fe
test eax, eax
jne 0x516bef
mov ecx, dword [ebp - 0x20]
call fcn.005126fe
test eax, eax
jne 0x516bef
mov ecx, dword [ebp - 0x30]
call fcn.005126fe
test eax, eax
jne 0x516bef
mov ecx, dword [ebp - 0x34]
call fcn.005126fe
test eax, eax
jne 0x516bef
mov ecx, dword [ebp - 0x38]
call fcn.005126fe
test eax, eax
jne 0x516bef
mov ecx, dword [ebp - 0x3c]
call fcn.005126fe
test eax, eax
jne 0x516bef
mov ecx, dword [ebp - 0x50]
call fcn.005126fe
test eax, eax
jne 0x516bef
mov word [ebp - 0x4c], ax
push dword [ebp - 0x4c]
mov eax, dword [ebx + 0x18]
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 0x1c]
imul eax, esi
add eax, edi
imul ecx, eax, 0x2c
add ecx, dword [ebx + 0x30]
call fcn.00434e3f
mov eax, dword [ebx + 0x18]
imul eax, esi
push edi
add eax, edi
imul ecx, eax, 0x2c
add ecx, dword [ebx + 0x30]
mov eax, dword [ecx]
call dword [eax + 0x10]
mov eax, dword [ebx + 0x18]
imul eax, esi
push esi
add eax, edi
imul ecx, eax, 0x2c
add ecx, dword [ebx + 0x30]
mov eax, dword [ecx]
call dword [eax + 0x18]
jmp 0x516bfe
xor eax, eax
inc eax
mov word [ebp - 0x48], ax
push dword [ebp - 0x48]
jmp 0x516bac
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
inc eax
push 3
pop edx
add ecx, edx
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebx + 0x18]
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
jb 0x516a4b
push edx
pop ecx
inc esi
add eax, ecx
mov dword [ebp + 8], esi
mov dword [ebp - 0x18], eax
cmp esi, dword [ebx + 0x1c]
jb 0x516a2d
lea edi, [ebx + 4]
mov esi, dword [ebx + 8]
xor ecx, ecx
mov eax, dword [edi]
shr eax, 2
shr esi, 2
mov dword [ebx + 0x24], esi
imul esi, eax
mov dword [ebx + 0x20], eax
push 0x2c
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.0054b016
pop ecx
mov dword [ebp + 8], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x516c94
push fcn.00513fff
push 0x513fc5
push esi
push 0x2c
lea edi, [eax + 4]
mov dword [eax], esi
pop eax
push eax
push edi
call fcn.00553df4
jmp 0x516c96
xor edi, edi
or dword [ebp - 4], 0xffffffff
xor esi, esi
mov dword [ebx + 0x34], edi
mov dword [ebp + 8], esi
cmp dword [ebx + 0x24], esi
jbe 0x516fe3
xor eax, eax
mov dword [ebp - 0x18], eax
and dword [ebp - 0x24], 0
cmp dword [ebx + 0x20], 0
jbe 0x516fd0
lea ecx, [eax + 2]
lea edx, [ecx - 1]
mov dword [ebp - 0x20], ecx
inc ecx
mov dword [ebp - 0x1c], edx
push 2
mov dword [ebp - 0x2c], ecx
pop ecx
mov dword [ebp - 0x14], ecx
mov esi, dword [ebp - 0x10]
lea ebx, [ecx - 2]
push eax
push ebx
mov ecx, esi
call fcn.005163dc
mov edi, dword [ebp - 0x14]
mov ecx, esi
push dword [ebp - 0x18]
dec edi
mov dword [ebp - 0x64], eax
push edi
call fcn.005163dc
push dword [ebp - 0x18]
mov ecx, esi
mov dword [ebp - 0x68], eax
push dword [ebp - 0x14]
call fcn.005163dc
mov esi, dword [ebp - 0x14]
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
inc esi
push esi
mov dword [ebp - 0x6c], eax
call fcn.005163dc
push dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
push ebx
mov dword [ebp - 0x3c], eax
call fcn.005163dc
push dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
push edi
mov dword [ebp - 0x38], eax
call fcn.005163dc
push dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
push dword [ebp - 0x14]
mov dword [ebp - 0x34], eax
call fcn.005163dc
push dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
push esi
mov dword [ebp - 0x30], eax
call fcn.005163dc
push dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
push ebx
mov dword [ebp - 0x40], eax
call fcn.005163dc
push dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
push edi
mov dword [ebp - 0x44], eax
call fcn.005163dc
push dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
push dword [ebp - 0x14]
mov dword [ebp - 0x48], eax
call fcn.005163dc
push dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
push esi
mov dword [ebp - 0x4c], eax
call fcn.005163dc
push dword [ebp - 0x2c]
mov dword [ebp - 0x50], eax
push ebx
mov ebx, dword [ebp - 0x10]
mov ecx, ebx
call fcn.005163dc
push dword [ebp - 0x2c]
mov ecx, ebx
mov dword [ebp - 0x54], eax
push edi
call fcn.005163dc
mov edi, dword [ebp - 0x2c]
mov ecx, ebx
push edi
push dword [ebp - 0x14]
mov dword [ebp - 0x58], eax
call fcn.005163dc
push edi
push esi
mov ecx, ebx
mov dword [ebp - 0x5c], eax
call fcn.005163dc
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x70], eax
test ecx, ecx
je 0x516fb1
mov esi, dword [ebp - 0x68]
test esi, esi
je 0x516fb1
mov edi, dword [ebp - 0x6c]
test edi, edi
je 0x516fb1
cmp dword [ebp - 0x3c], 0
je 0x516fb1
cmp dword [ebp - 0x38], 0
je 0x516fb1
cmp dword [ebp - 0x34], 0
je 0x516fb1
cmp dword [ebp - 0x30], 0
je 0x516fb1
cmp dword [ebp - 0x40], 0
je 0x516fb1
cmp dword [ebp - 0x44], 0
je 0x516fb1
cmp dword [ebp - 0x48], 0
je 0x516fb1
cmp dword [ebp - 0x4c], 0
je 0x516fb1
cmp dword [ebp - 0x50], 0
je 0x516fb1
cmp dword [ebp - 0x54], 0
je 0x516fb1
cmp dword [ebp - 0x58], 0
je 0x516fb1
cmp dword [ebp - 0x5c], 0
je 0x516fb1
test eax, eax
je 0x516fb1
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, esi
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, edi
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, dword [ebp - 0x3c]
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, dword [ebp - 0x38]
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, dword [ebp - 0x34]
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, dword [ebp - 0x30]
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, dword [ebp - 0x40]
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, dword [ebp - 0x44]
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, dword [ebp - 0x48]
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, dword [ebp - 0x4c]
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, dword [ebp - 0x50]
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, dword [ebp - 0x54]
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, dword [ebp - 0x58]
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, dword [ebp - 0x5c]
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov ecx, dword [ebp - 0x70]
call fcn.005126fe
test eax, eax
jne 0x516fa5
mov word [ebp - 0x74], ax
push dword [ebp - 0x74]
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 0x24]
imul eax, esi
add eax, edi
imul ecx, eax, 0x2c
add ecx, dword [ebx + 0x34]
call fcn.00434e3f
mov eax, dword [ebx + 0x20]
imul eax, esi
push edi
add eax, edi
imul ecx, eax, 0x2c
add ecx, dword [ebx + 0x34]
mov eax, dword [ecx]
call dword [eax + 0x10]
mov eax, dword [ebx + 0x20]
imul eax, esi
push esi
add eax, edi
imul ecx, eax, 0x2c
add ecx, dword [ebx + 0x34]
mov eax, dword [ecx]
call dword [eax + 0x18]
jmp 0x516fb4
xor eax, eax
inc eax
mov word [ebp - 0x78], ax
push dword [ebp - 0x78]
jmp 0x516f62
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x14]
inc eax
add ecx, 4
mov dword [ebp - 0x24], eax
cmp eax, dword [ebx + 0x20]
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
jb 0x516cd4
inc esi
add eax, 4
mov dword [ebp + 8], esi
mov dword [ebp - 0x18], eax
cmp esi, dword [ebx + 0x24]
jb 0x516cb0
xor eax, eax
inc eax
call fcn.005509ad
ret 4