Function at 0x511690
Capabilities:
Read file via mapping
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
call fcn.00403e40
xor eax, eax
push ebp
push 0x511bb9
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [0x40ce98]
call fcn.00402e3c
mov dword [ebp - 0x28], eax
mov dl, 1
mov eax, dword [0x40ce98]
call fcn.00402e3c
mov dword [ebp - 0x2c], eax
mov dl, 1
mov eax, dword [0x40ce98]
call fcn.00402e3c
mov dword [ebp - 0x30], eax
mov dl, 1
mov eax, dword [0x40ce98]
call fcn.00402e3c
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x38], 0xffffffff
xor eax, eax
mov dword [ebp - 0x3c], eax
xor ecx, ecx
push ebp
push 0x511b89
push dword fs:[ecx]
mov dword fs:[ecx], esp
mov edx, 0x20
mov eax, dword [ebp + 8]
call fcn.004075b8
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jge 0x511738
call fcn.00403508
jmp 0x511b93
push 0
push 0
push 0
push 2
push 0
mov eax, dword [ebp - 0x38]
push eax
call sub.kernel32.dll_CreateFileMappingA
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x51175e
call fcn.00403508
jmp 0x511b93
push 0
push 0
push 0
push 4
mov eax, dword [ebp - 0x3c]
push eax
call sub.kernel32.dll_MapViewOfFile
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x511782
call fcn.00403508
jmp 0x511b93
xor ecx, ecx
push ebp
push 0x511a89
push dword fs:[ecx]
mov dword fs:[ecx], esp
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x3c]
add eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp dword [eax], 0x4550
je 0x5117b9
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.00403508
jmp 0x511b93
mov ebx, dword [ebp - 4]
add ebx, 0x78
call fcn.005231f4
shl eax, 3
mov dword [ebp - 0x1c], eax
mov eax, ebx
add eax, dword [ebp - 0x1c]
mov dword [ebp - 8], eax
mov eax, 1
mov edx, dword [ebx + eax*8]
test edx, edx
je 0x51192a
cmp dword [ebx + eax*8 + 4], 0
je 0x51192a
push ebp
mov eax, edx
call fcn.00511610
pop ecx
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x51192a
xor eax, eax
mov dword [ebp - 0x1c], eax
jmp 0x511915
push ebp
mov edx, dword [ebp - 0x1c]
lea edx, [edx + edx*4]
mov ecx, dword [ebp - 0x18]
call fcn.00511610
pop ecx
mov esi, eax
lea edx, [ebp - 0x40]
mov eax, esi
call fcn.00407cec
mov eax, dword [ebp - 0x40]
lea edx, [ebp - 0x20]
call fcn.00406fec
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
call fcn.005114dc
mov esi, eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x29c]
mov ecx, esi
mov edx, dword [ebp - 0x20]
mov edi, dword [eax]
call dword [edi + 0x38]
mov edi, eax
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x50]
inc eax
jne 0x511912
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x34]
push edi
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x220]
mov eax, dword [eax + 0x134]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x14]
call fcn.00474d74
mov dword [ebp - 0x24], eax
cmp esi, 0xffffffff
je 0x5118f8
mov edx, 0x23
mov eax, dword [ebp - 0x24]
call fcn.00474024
mov edx, 0x23
mov eax, dword [ebp - 0x24]
call fcn.00474058
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x290]
mov edx, dword [ebp - 0x20]
mov ecx, dword [eax]
call dword [ecx + 0x50]
inc eax
jne 0x511912
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x290]
mov edx, dword [ebp - 0x20]
mov ecx, dword [eax]
call dword [ecx + 0x34]
lea ecx, [ebp - 0x40]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x298]
mov edx, esi
mov esi, dword [eax]
call dword [esi + 0xc]
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
mov esi, dword [eax]
call dword [esi + 0x38]
jmp 0x511912
mov edx, 0x25
mov eax, dword [ebp - 0x24]
call fcn.00474024
mov edx, 0x25
mov eax, dword [ebp - 0x24]
call fcn.00474058
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + eax*4 + 0xc]
test eax, eax
jne 0x51180d
mov eax, 0xd
mov edx, dword [ebx + eax*8]
test edx, edx
je 0x511a7d
cmp dword [ebx + eax*8 + 4], 0
je 0x511a7d
push ebp
mov eax, edx
call fcn.00511610
pop ecx
mov ebx, eax
test ebx, ebx
je 0x511a7d
jmp 0x511a72
test byte [ebx], 1
jne 0x511973
push ebp
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x34]
call fcn.00511610
pop ecx
mov esi, eax
jmp 0x51197c
push ebp
call fcn.00511610
pop ecx
mov esi, eax
lea edx, [ebp - 0x40]
mov eax, esi
call fcn.00407cec
mov eax, dword [ebp - 0x40]
lea edx, [ebp - 0x20]
call fcn.00406fec
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
call fcn.005114dc
mov esi, eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x29c]
mov ecx, esi
mov edx, dword [ebp - 0x20]
mov edi, dword [eax]
call dword [edi + 0x38]
mov edi, eax
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax]
call dword [ecx + 0x50]
inc eax
jne 0x511a6f
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax]
call dword [ecx + 0x34]
push edi
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x220]
mov eax, dword [eax + 0x134]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x14]
call fcn.00474d74
mov dword [ebp - 0x24], eax
cmp esi, 0xffffffff
je 0x511a55
mov edx, 0x24
mov eax, dword [ebp - 0x24]
call fcn.00474024
mov edx, 0x24
mov eax, dword [ebp - 0x24]
call fcn.00474058
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x294]
mov edx, dword [ebp - 0x20]
mov ecx, dword [eax]
call dword [ecx + 0x50]
inc eax
jne 0x511a6f
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x294]
mov edx, dword [ebp - 0x20]
mov ecx, dword [eax]
call dword [ecx + 0x34]
lea ecx, [ebp - 0x40]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x298]
mov edx, esi
mov esi, dword [eax]
call dword [esi + 0xc]
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x2c]
mov esi, dword [eax]
call dword [esi + 0x38]
jmp 0x511a6f
mov edx, 0x26
mov eax, dword [ebp - 0x24]
call fcn.00474024
mov edx, 0x26
mov eax, dword [ebp - 0x24]
call fcn.00474058
add ebx, 0x20
mov eax, dword [ebx + 4]
test eax, eax
jne 0x51195d
pop dword fs:[0]
add esp, 8
jmp 0x511a93
pop dword fs:[0]
add esp, 8
push 0x511b93
cmp dword [ebp - 0xc], 0
je 0x511ab1
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_UnmapViewOfFile
cmp dword [ebp - 0x3c], 0
je 0x511ac0
mov eax, dword [ebp - 0x3c]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebp - 0x38], 0xffffffff
je 0x511ace
mov eax, dword [ebp - 0x38]
call fcn.00407680
mov eax, dword [ebp - 0x28]
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
dec esi
test esi, esi
jl 0x511b0b
inc esi
xor ebx, ebx
lea ecx, [ebp - 0x40]
mov edx, ebx
mov eax, dword [ebp - 0x28]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x40]
push eax
mov edx, ebx
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov edx, eax
xor ecx, ecx
mov eax, dword [ebp - 0x10]
call fcn.00511690
inc ebx
dec esi
jne 0x511ae0
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
dec esi
test esi, esi
jl 0x511b48
inc esi
xor ebx, ebx
lea ecx, [ebp - 0x40]
mov edx, ebx
mov eax, dword [ebp - 0x2c]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x40]
push eax
mov edx, ebx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov edx, eax
xor ecx, ecx
mov eax, dword [ebp - 0x10]
call fcn.00511690
inc ebx
dec esi
jne 0x511b1d
mov eax, dword [ebp - 0x28]
mov edx, dword [eax]
call dword [edx + 0x40]
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax]
call dword [edx + 0x40]
mov eax, dword [ebp - 0x30]
mov edx, dword [eax]
call dword [edx + 0x40]
mov eax, dword [ebp - 0x34]
mov edx, dword [eax]
call dword [edx + 0x40]
mov eax, dword [ebp - 0x28]
call fcn.00402e64
mov eax, dword [ebp - 0x2c]
call fcn.00402e64
mov eax, dword [ebp - 0x30]
call fcn.00402e64
mov eax, dword [ebp - 0x34]
call fcn.00402e64
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x511bc0
lea eax, [ebp - 0x40]
call fcn.00403a10
lea eax, [ebp - 0x20]
call fcn.00403a10
lea eax, [ebp + 8]
call fcn.00403a10
ret