Function at 0x513798
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
mov ecx, 8
push 0
push 0
dec ecx
jne 0x5137a0
push ecx
push ebx
push esi
push edi
mov byte [ebp - 0x25], dl
mov ebx, eax
xor eax, eax
push ebp
push 0x513c22
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x26], 0
cmp byte [ebp - 0x25], 0
jne 0x5137e1
test byte [ebx + 0x1c], 0x10
jne 0x513bf2
mov eax, ebx
call fcn.0051409c
test al, al
je 0x513bf2
lea eax, [ebp - 4]
mov edx, dword [0x5464ec]
call fcn.00407384
xor eax, eax
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x2c], eax
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 0x10], eax
xor edx, edx
push ebp
push 0x513beb
push dword fs:[edx]
mov dword fs:[edx], esp
mov dl, 1
mov eax, dword [0x4362c0]
call fcn.00442d20
mov dword [ebp - 0xc], eax
mov dl, 1
mov eax, dword [0x4362c0]
call fcn.00442d20
mov dword [ebp - 0x14], eax
mov dl, 1
mov eax, dword [0x4362c0]
call fcn.00442d20
mov dword [ebp - 0x2c], eax
mov dl, 1
mov eax, dword [0x4362c0]
call fcn.00442d20
mov dword [ebp - 8], eax
mov eax, ebx
call fcn.00512b24
dec eax
test eax, eax
jl 0x513965
inc eax
mov dword [ebp - 0x34], eax
xor esi, esi
mov edx, esi
mov eax, ebx
call fcn.00512b34
cmp byte [eax + 0x3e], 0
je 0x51395b
mov edx, esi
mov eax, ebx
call fcn.00512b34
mov eax, dword [eax + 0x34]
mov edx, 0x513c40
call fcn.00407cc0
je 0x51395b
mov edx, esi
mov eax, ebx
call fcn.00512b34
cmp dword [eax + 0x34], 0
je 0x51395b
mov edx, esi
mov eax, ebx
call fcn.00512b34
mov eax, dword [eax + 0x34]
lea edx, [ebp - 0x38]
call fcn.00515f38
mov eax, dword [ebp - 0x38]
lea edx, [ebp - 0x1c]
call fcn.0041ce18
cmp dword [ebp - 0x1c], 0
jne 0x5138f1
mov edx, esi
mov eax, ebx
call fcn.00512b34
push eax
mov edx, esi
mov eax, ebx
call fcn.00512b34
mov ecx, dword [eax + 0x34]
xor edx, edx
mov eax, dword [ebp - 0x2c]
mov edi, dword [eax]
call dword [edi + 0x64]
jmp 0x51395b
mov edx, dword [0x5464ec]
mov eax, dword [ebp - 0x1c]
call fcn.004239a0
test eax, eax
je 0x51395b
push ebp
mov eax, dword [ebp - 0x1c]
call fcn.00513538
pop ecx
test al, al
jne 0x51395b
mov edx, esi
mov eax, ebx
call fcn.00512b34
add eax, 0x34
push eax
mov edx, esi
mov eax, ebx
call fcn.00512b34
mov eax, dword [eax + 0x34]
lea edx, [ebp - 0x3c]
call fcn.00515e1c
mov edx, dword [ebp - 0x3c]
pop eax
call fcn.0040733c
mov edx, esi
mov eax, ebx
call fcn.00512b34
push eax
mov edx, esi
mov eax, ebx
call fcn.00512b34
mov ecx, dword [eax + 0x34]
xor edx, edx
mov eax, dword [ebp - 0x2c]
mov edi, dword [eax]
call dword [edi + 0x64]
inc esi
dec dword [ebp - 0x34]
jne 0x513868
lea eax, [ebp - 0x24]
mov edx, dword [ebp - 4]
call fcn.00407384
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x513ae6
inc eax
mov dword [ebp - 0x34], eax
lea eax, [ebp - 4]
mov edx, dword [ebp - 0x24]
call fcn.00407384
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
dec esi
cmp esi, 0
jl 0x513a7c
lea ecx, [ebp - 0x20]
mov edx, esi
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov ebx, 1
jmp 0x513a62
mov eax, dword [ebp - 0x20]
cmp word [eax + ebx*2 - 2], 0xd800
jb 0x5139e9
mov eax, dword [ebp - 0x20]
cmp word [eax + ebx*2 - 2], 0xdfff
ja 0x5139e9
inc ebx
jmp 0x513a61
lea eax, [ebp - 0x40]
push eax
mov ecx, 1
mov edx, ebx
mov eax, dword [ebp - 0x20]
call fcn.00407cf8
mov eax, dword [ebp - 0x40]
lea edx, [ebp - 0x1c]
call fcn.0041ce18
push ebp
mov eax, dword [ebp - 0x1c]
call fcn.00513538
pop ecx
test al, al
je 0x513a61
mov eax, dword [0x547780]
cmp byte [eax + 0xc], 0
je 0x513a2f
lea eax, [ebp - 0x20]
mov ecx, ebx
mov edx, dword [ebp - 0x1c]
call fcn.005135ec
jmp 0x513a3e
lea edx, [ebp - 0x20]
mov ecx, ebx
mov eax, 0x513c50
call fcn.00407da4
mov edx, esi
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov ecx, eax
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0x3c]
mov edx, esi
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 0x48]
jmp 0x513a72
inc ebx
mov eax, dword [ebp - 0x20]
call fcn.00407420
cmp ebx, eax
jle 0x5139ce
dec esi
cmp esi, 0xffffffff
jne 0x5139b7
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x14]
cmp eax, dword [ebp - 0x10]
jle 0x513a90
push ebp
call fcn.00513568
pop ecx
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x513ae6
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x14]
mov ebx, eax
dec ebx
test ebx, ebx
jl 0x513add
inc ebx
xor esi, esi
mov edx, esi
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov edx, eax
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
call dword [ecx + 0x5c]
mov edi, eax
mov eax, dword [ebp - 0x2c]
mov edx, dword [eax]
call dword [edx + 0x14]
mov ecx, eax
dec ecx
mov edx, edi
mov eax, dword [ebp - 0x2c]
mov edi, dword [eax]
call dword [edi + 0x78]
inc esi
dec ebx
jne 0x513aae
dec dword [ebp - 0x34]
jne 0x513985
cmp dword [ebp - 0x10], 0
jne 0x513af3
push ebp
call fcn.00513568
pop ecx
mov eax, dword [ebp - 8]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
setg byte [ebp - 0x26]
mov eax, dword [ebp - 8]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x513bbd
inc eax
mov dword [ebp - 0x34], eax
xor esi, esi
lea ecx, [ebp - 0x20]
mov edx, esi
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [0x547780]
cmp byte [eax + 0xc], 0
je 0x513b9e
mov edx, dword [ebp - 0x20]
mov eax, 0x513c50
call fcn.004239a0
test eax, eax
jne 0x513b9e
cmp dword [ebp - 0x18], 0
je 0x513b9e
mov edx, dword [ebp - 0x20]
mov eax, 0x513c50
call fcn.004239a0
test eax, eax
jne 0x513b9e
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x513b64
sub ebx, 4
mov ebx, dword [ebx]
lea eax, [ebp - 0x44]
push eax
mov ecx, 1
mov edx, ebx
mov eax, dword [ebp - 0x18]
call fcn.00407cf8
mov edx, dword [ebp - 0x44]
lea eax, [ebp - 0x20]
xor ecx, ecx
call fcn.005135ec
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x513b90
sub eax, 4
mov eax, dword [eax]
lea edx, [ebp - 0x18]
mov ecx, 1
xchg edx, eax
call fcn.00407d40
mov edx, esi
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x18]
add eax, 0x34
mov edx, dword [ebp - 0x20]
call fcn.0040733c
inc esi
dec dword [ebp - 0x34]
jne 0x513b18
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x513bf2
mov eax, dword [ebp - 8]
call fcn.0040555c
mov eax, dword [ebp - 0x2c]
call fcn.0040555c
mov eax, dword [ebp - 0x14]
call fcn.0040555c
mov eax, dword [ebp - 0xc]
call fcn.0040555c
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x513c29
lea eax, [ebp - 0x44]
mov edx, 4
call fcn.00406fdc
lea eax, [ebp - 0x24]
mov edx, 4
call fcn.00406fdc
lea eax, [ebp - 4]
call fcn.00406f7c
ret