Function at 0x512b52
Capabilities:
Read file via mapping

Disassembly:
mov eax, 0x576e14
call fcn.00524444
sub esp, 0x70
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov ebx, ecx
push edi
push 0xa
lea ecx, [ebp - 0x3c]
mov dword [ebx + 0x34], eax
call fcn.00515601
mov eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, edi
mov dword [ebp - 4], edi
mov dword [ebp + 0x10], edi
jbe 0x512c72
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x14], eax
lea esi, [ecx + 4]
mov dword [ebp + 8], esi
mov eax, dword [esi - 4]
cmp eax, dword [esi]
mov dword [ebp + 0xc], eax
ja 0x512c23
mov ecx, dword [ebp + 0x10]
lea ecx, [ecx + ecx*4]
shl ecx, 2
mov dword [ebp - 0x10], ecx
jmp 0x512bb7
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
xor edi, edi
mov ecx, dword [esi + 4]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x48], ecx
xor ecx, ecx
cmp eax, dword [esi - 4]
lea eax, [ebp - 0x50]
push eax
mov dword [ebp - 0x44], edi
sete cl
mov dword [ebp - 0x40], ecx
lea ecx, [ebx + 0x38]
call fcn.005154c2
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp + 0x10]
ja 0x512bfa
push 1
lea ecx, [ebp - 0x64]
push edi
add eax, eax
push ecx
push eax
lea ecx, [ebp - 0x3c]
call fcn.00515cf0
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x10]
inc dword [ebp + 0x10]
add dword [ebp - 0x10], 0x14
inc dword [ebp + 0xc]
push 5
lea edi, [ecx + eax]
mov eax, dword [ebp + 8]
pop ecx
lea esi, [ebp - 0x50]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [eax]
jbe 0x512baf
mov esi, eax
xor edi, edi
test byte [esi + 4], 8
je 0x512c43
mov eax, dword [esi - 4]
lea ecx, [ebx + 0x2a8]
mov dword [ebp - 0x6c], eax
mov eax, dword [esi]
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x7c]
push eax
call fcn.00515591
mov ecx, dword [esi - 4]
mov eax, dword [esi]
sub eax, ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebx + 0x2c0]
call fcn.00515b81
add esi, 0xc
dec dword [ebp - 0x14]
mov dword [ebp + 8], esi
jne 0x512b93
push 1
lea eax, [ebp - 0x64]
push edi
push eax
push dword [ebp + 0x10]
lea ecx, [ebp - 0x3c]
call fcn.00515cf0
push 0x51291b
push 0x14
push dword [ebp + 0x10]
push dword [ebp - 0x3c]
call fcn.00527e3e
add esp, 0x10
xor esi, esi
cmp dword [ebp - 0x38], edi
jbe 0x512ceb
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebx + 0x3c]
mov eax, dword [edi + eax + 8]
lea eax, [eax + eax*4]
mov dword [ecx + eax*4 + 8], esi
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebx + 0x3c]
mov ecx, dword [edi + eax + 8]
lea eax, [edi + eax + 8]
mov eax, ecx
lea eax, [eax + eax*4]
mov edx, dword [edx + eax*4]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], ecx
push eax
lea ecx, [ebx + 0x48]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], esi
call fcn.005159fe
inc esi
add edi, 0x14
cmp esi, dword [ebp - 0x38]
jb 0x512ca0
xor edi, edi
lea ecx, [ebp - 0x3c]
call fcn.00515623
cmp dword [ebx + 0x14], edi
jne 0x512cfe
and word [ebx + 0x28], 0xff
cmp dword [ebx + 0x34], edi
jne 0x512d2e
push 4
push 0x1000
push 0xa0000
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
cmp eax, edi
mov dword [ebx + 0x18c], eax
jne 0x512d2e
mov dword [ebx + 0x10], 0x201
xor bl, bl
jmp 0x512e2f
cmp dword [ebx + 0x14], 1
jne 0x512d48
mov eax, dword [ebx + 0x18]
cmp word [eax], 0xfeff
jne 0x512d48
add eax, 2
add dword [ebx + 0x1c], 0xfffffffe
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x18]
xor esi, esi
mov ecx, eax
mov dword [ebp + 0x10], eax
add ecx, dword [ebx + 0x1c]
mov dword [ebp - 0x18], eax
cmp eax, ecx
jae 0x512df8
mov ecx, ebx
call fcn.0051514a
lea eax, [ebp - 0x18]
mov ecx, ebx
push eax
push esi
push dword [ebp + 0x10]
call fcn.005130d1
mov eax, dword [ebp - 0x18]
inc esi
cmp dword [ebx + 0x20], edi
mov dword [ebp + 0x10], eax
je 0x512daf
sub eax, dword [ebx + 0x18]
mov dword [ebp - 0x1c], edi
push edi
mov dword [ebp + 0xc], eax
mov eax, dword [ebx + 0x1c]
fild dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
fmul dword [0x58de4c]
fild qword [ebp - 0x20]
fdivp st(1)
call fcn.00528c4c
push eax
push 1
mov ecx, ebx
call fcn.00514cf7
mov eax, dword [ebx + 0x18]
add eax, dword [ebx + 0x1c]
cmp dword [ebp + 0x10], eax
jb 0x512d60
cmp esi, edi
jbe 0x512df8
push 1
lea eax, [ebp - 0x30]
push edi
push eax
lea ecx, [ebx + 4]
push esi
mov dword [ebp - 0x30], edi
call fcn.00515890
mov ecx, dword [ebx + 4]
cmp dword [ebx + 0x14], 1
lea eax, [esi + esi*2]
lea ecx, [ecx + eax*4 - 0xc]
movzx eax, word [ecx + 4]
jne 0x512de9
dec eax
dec eax
jmp 0x512dea
dec eax
mov ecx, dword [ecx]
cmp byte [ecx + eax], 0
jne 0x512df8
mov dword [ebx + 0x2a4], ecx
cmp dword [ebx + 0x34], edi
jne 0x512ef9
push edi
mov ecx, ebx
call fcn.00514b06
lea esi, [ebx + 0x18c]
push 0x8000
push edi
mov dword [ebx + 0x2a0], eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
cmp dword [ebx + 0x2a0], edi
mov dword [esi], edi
jne 0x512e42
mov bl, 1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.00515623
mov al, bl
jmp 0x512f0f
push edi
push 0x4000001
push 3
push edi
push edi
lea eax, [ebx + 0x190]
push bind
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, edi
mov dword [ebx + 0x294], eax
jne 0x512e84
mov ecx, ebx
call fcn.00512f20
lea eax, [ebp + 0x10]
push 0x5af2c0
push eax
mov dword [ebp + 0x10], 0x201
call fcn.00529cc7
push edi
push dword [ebx + 0x2a0]
push edi
push 2
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
push dword [ebx + 0x2a0]
mov dword [ebx + 0x298], eax
push edi
push edi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, edi
mov dword [ebx + 0x29c], eax
jne 0x512ed3
mov ecx, ebx
call fcn.00512f20
lea eax, [ebp + 0x10]
push 0x5af2c0
push eax
mov dword [ebp + 0x10], 0x201
call fcn.00529cc7
xor edx, edx
cmp dword [ebx + 8], edi
jbe 0x512ef9
xor ecx, ecx
mov eax, ecx
add eax, dword [ebx + 4]
mov eax, dword [eax + 8]
cmp eax, edi
je 0x512ef0
mov esi, dword [ebx + 0x29c]
add dword [eax], esi
inc edx
add ecx, 0xc
cmp edx, dword [ebx + 8]
jb 0x512edc
lea ecx, [ebx + 0x48]
call fcn.00515b33
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x3c]
call fcn.00515623
mov al, 1
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc