Function at 0x515838
Capabilities:
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 0x515d61
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [0x40cebc]
call fcn.00402e3c
mov dword [ebp - 0x28], eax
mov dl, 1
mov eax, dword [0x40cebc]
call fcn.00402e3c
mov dword [ebp - 0x2c], eax
mov dl, 1
mov eax, dword [0x40cebc]
call fcn.00402e3c
mov dword [ebp - 0x30], eax
mov dl, 1
mov eax, dword [0x40cebc]
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 0x515d31
push dword fs:[ecx]
mov dword fs:[ecx], esp
mov edx, 0x20
mov eax, dword [ebp + 8]
call fcn.004075dc
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jge 0x5158e0
call fcn.00403508
jmp 0x515d3b
push 0
push 0
push 0
push 2
push 0
mov eax, dword [ebp - 0x38]
push eax
call fcn.00405700
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x515906
call fcn.00403508
jmp 0x515d3b
push 0
push 0
push 0
push 4
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00405900
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x51592a
call fcn.00403508
jmp 0x515d3b
xor ecx, ecx
push ebp
push 0x515c31
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 0x515961
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.00403508
jmp 0x515d3b
mov ebx, dword [ebp - 4]
add ebx, 0x78
call fcn.00527e5c
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 0x515ad2
cmp dword [ebx + eax*8 + 4], 0
je 0x515ad2
push ebp
mov eax, edx
call fcn.005157b8
pop ecx
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x515ad2
xor eax, eax
mov dword [ebp - 0x1c], eax
jmp 0x515abd
push ebp
mov edx, dword [ebp - 0x1c]
lea edx, [edx + edx*4]
mov ecx, dword [ebp - 0x18]
call fcn.005157b8
pop ecx
mov esi, eax
lea edx, [ebp - 0x40]
mov eax, esi
call fcn.00407d10
mov eax, dword [ebp - 0x40]
lea edx, [ebp - 0x20]
call fcn.00407010
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
call fcn.00515684
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 0x515aba
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.00474d98
mov dword [ebp - 0x24], eax
cmp esi, 0xffffffff
je 0x515aa0
mov edx, 0x23
mov eax, dword [ebp - 0x24]
call fcn.00474048
mov edx, 0x23
mov eax, dword [ebp - 0x24]
call fcn.0047407c
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 0x515aba
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 0x515aba
mov edx, 0x25
mov eax, dword [ebp - 0x24]
call fcn.00474048
mov edx, 0x25
mov eax, dword [ebp - 0x24]
call fcn.0047407c
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 0x5159b5
mov eax, 0xd
mov edx, dword [ebx + eax*8]
test edx, edx
je 0x515c25
cmp dword [ebx + eax*8 + 4], 0
je 0x515c25
push ebp
mov eax, edx
call fcn.005157b8
pop ecx
mov ebx, eax
test ebx, ebx
je 0x515c25
jmp 0x515c1a
test byte [ebx], 1
jne 0x515b1b
push ebp
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x34]
call fcn.005157b8
pop ecx
mov esi, eax
jmp 0x515b24
push ebp
call fcn.005157b8
pop ecx
mov esi, eax
lea edx, [ebp - 0x40]
mov eax, esi
call fcn.00407d10
mov eax, dword [ebp - 0x40]
lea edx, [ebp - 0x20]
call fcn.00407010
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
call fcn.00515684
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 0x515c17
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.00474d98
mov dword [ebp - 0x24], eax
cmp esi, 0xffffffff
je 0x515bfd
mov edx, 0x24
mov eax, dword [ebp - 0x24]
call fcn.00474048
mov edx, 0x24
mov eax, dword [ebp - 0x24]
call fcn.0047407c
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 0x515c17
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 0x515c17
mov edx, 0x26
mov eax, dword [ebp - 0x24]
call fcn.00474048
mov edx, 0x26
mov eax, dword [ebp - 0x24]
call fcn.0047407c
add ebx, 0x20
mov eax, dword [ebx + 4]
test eax, eax
jne 0x515b05
pop dword fs:[0]
add esp, 8
jmp 0x515c3b
pop dword fs:[0]
add esp, 8
push 0x515d3b
cmp dword [ebp - 0xc], 0
je 0x515c59
mov eax, dword [ebp - 0xc]
push eax
call fcn.004059a8
cmp dword [ebp - 0x3c], 0
je 0x515c68
mov eax, dword [ebp - 0x3c]
push eax
call fcn.004056d8
cmp dword [ebp - 0x38], 0xffffffff
je 0x515c76
mov eax, dword [ebp - 0x38]
call fcn.004076a4
mov eax, dword [ebp - 0x28]
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
dec esi
test esi, esi
jl 0x515cb3
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.00515838
inc ebx
dec esi
jne 0x515c88
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
dec esi
test esi, esi
jl 0x515cf0
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.00515838
inc ebx
dec esi
jne 0x515cc5
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 0x515d68
lea eax, [ebp - 0x40]
call fcn.00403a10
lea eax, [ebp - 0x20]
call fcn.00403a10
lea eax, [ebp + 8]
call fcn.00403a10
ret