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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, dword [eax*4 + 0x20a514c]
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x18], esi
test eax, eax
js 0x513c1f
cmp eax, 0x1194
jge 0x513c1f
mov ebx, dword [eax*4 + 0x20a514c]
mov dword [esp + 0x20], ebx
movzx edi, word [ebx + 0x78]
cmp edi, 1
jne 0x513b81
cmp dword [ebx + 0x1e8], 0x20
je 0x513c1f
movsx eax, word [ebx + 0x146]
push eax
movsx eax, word [ebx + 0x144]
push eax
movsx eax, word [esi + 0x146]
push eax
movsx eax, word [esi + 0x144]
push eax
mov eax, dword [ebp + 0x10]
movzx eax, word [eax + 8]
push eax
call fcn.00507fe0
test al, al
je 0x513c1f
cmp edi, 1
jne 0x513bc9
mov eax, edi
push eax
push 0xffffffffffffffff
push dword [ebp + 0xc]
push esi
call fcn.005082f0
test al, al
je 0x513c1f
mov eax, dword [esi + 0x120]
add eax, dword [esi + 0xf4]
cdq
idiv dword [0xbdc140]
mov esi, eax
add esi, dword [0xbdc13c]
call fcn.00526930
cdq
mov ecx, 0x64
idiv ecx
cmp edx, esi
jl 0x513c2a
mov esi, dword [esp + 0x18]
mov edx, dword [ebx]
push 0
push 0
mov ecx, dword [esi]
push 0
push 0
call fcn.004e94a0
mov eax, dword [ebp + 0x10]
add esp, 0x10
movzx eax, word [eax + 8]
push 0
push dword [ebx]
push eax
push esi
call fcn.00517480
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x624]
xor edx, edx
add eax, 4
mov ecx, eax
mov bl, byte [ecx]
mov byte [esp + 0xd], bl
cmp bl, 0xff
mov ebx, dword [esp + 0x20]
je 0x513c4d
cmp byte [esp + 0xd], 0x86
je 0x513bf5
inc edx
add ecx, 0x1c
cmp edx, 0x20
jl 0x513c37
xor ecx, ecx
mov dl, byte [eax]
cmp dl, 0xff
je 0x513c64
cmp dl, 0xa5
je 0x513bf5
inc ecx
add eax, 0x1c
cmp ecx, 0x20
jl 0x513c58
mov edi, dword [ebp + 0x10]
mov edx, 0x1cf
movzx eax, word [edi + 8]
mov ecx, eax
cmp ax, dx
jne 0x513cf8
push edx
push dword [esp + 0x1c]
call fcn.004b6100
mov esi, eax
call fcn.00526930
cdq
mov ecx, 0x64
idiv ecx
movzx eax, word [edi + 8]
cmp edx, esi
jge 0x513cf6
mov esi, eax
mov ecx, 0xbf0bd4
lea eax, [esp + 0x34]
mov dword [esp + 0x34], esi
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.00405650
mov eax, dword [esp + 0x40]
mov ecx, dword [0xbf0bd4]
cmp byte [eax + 0xd], 0
jne 0x513cd0
cmp esi, dword [eax + 0x10]
jge 0x513cd2
mov eax, ecx
cmp eax, ecx
jne 0x513cdb
or eax, 0xffffffff
jmp 0x513cde
mov eax, dword [eax + 0x54]
push 0
push 0
push 0
push 0
push 2
push eax
push 0
push ebx
call fcn.00477200
jmp 0x514068
mov ecx, eax
mov eax, dword [0xbdc148]
movzx edi, word [0xbdc144]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x34]
push eax
movzx esi, cx
lea eax, [esp + 0x3c]
push eax
mov ecx, 0xbf0bd4
mov dword [esp + 0x3c], esi
call fcn.00405650
mov eax, dword [esp + 0x40]
mov ecx, dword [0xbf0bd4]
cmp byte [eax + 0xd], 0
jne 0x513d38
cmp esi, dword [eax + 0x10]
jge 0x513d3a
mov eax, ecx
cmp eax, ecx
je 0x514068
mov ecx, dword [eax + 0x54]
mov eax, edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], eax
test ecx, ecx
js 0x514068
cmp ecx, 0x100
jge 0x514068
imul eax, ecx, 0x4c
cmp dword [eax + 0x6460e4], ecx
lea edi, [eax + 0x6460e4]
jne 0x514068
test edi, edi
je 0x514068
mov edx, dword [edi + 0x38]
cmp edx, 0xffffffff
je 0x513da7
cmp dword [edi + 0x30], 2
jne 0x513da1
push 0
call fcn.0052d9f5
mov dword [esp + 0x40], edx
add esp, 4
mov edx, dword [edi + 0x38]
add edx, eax
mov dword [esp + 0x10], edx
jmp 0x513dab
mov edx, dword [esp + 0x10]
mov eax, dword [edi + 0x3c]
cmp eax, 0xffffffff
je 0x513dba
movzx eax, ax
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x40]
xor esi, esi
cmp eax, 0xffffffff
movzx ecx, ax
cmove ecx, esi
movzx eax, cx
mov dword [esp + 0x28], eax
movzx eax, ax
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 0x44]
cmp eax, 0xffffffff
movzx ecx, ax
cmove ecx, esi
movzx eax, cx
mov dword [esp + 0x24], eax
movzx eax, ax
mov dword [esp + 0x30], eax
mov eax, dword [edi + 0x48]
cmp eax, 0xffffffff
movzx ecx, ax
cmove ecx, esi
mov esi, dword [ebx + 0x624]
movzx eax, cx
xor ecx, ecx
mov dword [esp + 0x38], eax
movzx eax, ax
mov dword [esp + 0x34], eax
mov al, byte [esi + 4]
mov byte [esp + 0xd], al
cmp al, 0xff
je 0x513e2a
movzx eax, byte [esi + 5]
cmp eax, dword [edi + 4]
je 0x513ed9
inc ecx
add esi, 0x1c
cmp ecx, 0x20
jl 0x513e12
xor eax, eax
mov dword [esp + 0x24], eax
nop dword [eax]
mov esi, dword [ebx + 0x624]
mov ecx, edx
mov bl, byte [edi + 0x34]
add esi, eax
mov byte [esp + 0xe], bl
mov bl, byte [edi + 0x30]
mov byte [esp + 0xc], bl
cmp byte [esi + 4], 0xff
mov bl, byte [edi + 0x2c]
mov byte [esp + 0xf], bl
mov bl, byte [edi + 4]
mov byte [esp + 0xd], bl
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x28], 0
jne 0x513ec2
cmp byte [esp + 0xc], 2
jne 0x513ff8
push 0
mov dword [esp + 0x2c], edx
call fcn.0052d9f5
add esp, 4
push edx
push eax
push 0
push dword [esp + 0x1c]
call fcn.0052d9b0
add esp, 0x10
fstp qword [esp + 0x38]
movsd xmm0, qword [esp + 0x38]
call fcn.00546020
mov ecx, eax
test ecx, ecx
jg 0x513ff8
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x10]
add eax, 0x1c
mov dword [esp + 0x24], eax
cmp eax, 0x380
jl 0x513e40
jmp 0x514068
movzx eax, byte [esp + 0xd]
cmp dword [esp + 0x1c], eax
jne 0x513f1c
mov eax, dword [esp + 0x14]
cmp ax, word [esi + 0x14]
jb 0x514068
mov eax, dword [esp + 0x28]
cmp ax, word [esi + 0x16]
jb 0x514068
mov eax, dword [esp + 0x24]
cmp ax, word [esi + 0x18]
jb 0x514068
mov eax, dword [esp + 0x38]
cmp ax, word [esi + 0x1a]
jb 0x514068
push esi
push ebx
mov ecx, 0x6460e0
call fcn.00478000
movzx eax, byte [esi + 4]
mov ecx, 0x6460e0
push eax
movzx eax, byte [esi + 5]
push 0
push 2
push 0
push eax
push ebx
call fcn.00478bb0
xor eax, eax
mov dword [esi + 4], 0xff
mov dword [esi + 0x10], 0
mov byte [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov cl, byte [edi + 0x2c]
mov dl, byte [edi + 4]
mov dword [esp + 0x20], eax
mov al, byte [edi + 0x34]
mov byte [esp + 0xf], al
mov al, byte [edi + 0x30]
mov byte [esp + 0xe], al
mov byte [esp + 0xc], cl
mov byte [esp + 0xd], dl
cmp al, 2
jne 0x513ff2
mov edi, dword [esp + 0x10]
push 0
mov dword [esp + 0x24], edi
call fcn.0052d9f5
add esp, 4
push edx
push eax
push 0
push edi
call fcn.0052d9b0
add esp, 0x10
fstp qword [esp + 0x38]
movsd xmm0, qword [esp + 0x38]
call fcn.00546020
test eax, eax
jle 0x514068
mov dl, byte [esp + 0xd]
mov dh, byte [esp + 0xc]
mov cl, byte [esp + 0x1c]
mov edi, dword [esp + 0x20]
mov byte [esi + 6], dh
mov dh, byte [esp + 0xe]
mov byte [esi + 7], dh
mov dh, byte [esp + 0xf]
push ecx
mov dword [esi + 0x10], eax
push eax
mov byte [esi + 4], cl
mov byte [esi + 5], dl
mov byte [esi + 8], dh
mov dword [esi + 0xc], edi
movzx eax, dl
jmp 0x51402c
mov eax, dword [esp + 0x10]
jmp 0x513fc2
mov dl, byte [esp + 0xd]
mov al, byte [esp + 0x1c]
mov byte [esi + 5], dl
mov dl, byte [esp + 0xf]
mov byte [esi + 6], dl
mov dl, byte [esp + 0xc]
mov byte [esi + 7], dl
mov dl, byte [esp + 0xe]
push eax
mov byte [esi + 8], dl
mov edx, dword [esp + 0x2c]
mov byte [esi + 4], al
movzx eax, byte [esp + 0x11]
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], ecx
push ecx
mov edi, dword [esp + 0x1c]
mov ecx, 0x6460e0
mov word [esi + 0x14], di
mov edi, dword [esp + 0x34]
push 0
mov word [esi + 0x16], di
mov edi, dword [esp + 0x3c]
push 0
mov word [esi + 0x18], di
mov edi, dword [esp + 0x44]
push eax
push ebx
mov word [esi + 0x1a], di
call fcn.00478bb0
push esi
push ebx
mov ecx, 0x6460e0
call fcn.00477580
mov eax, dword [ebp + 0x10]
push 1
push dword [ebp + 0xc]
movzx eax, word [eax + 8]
push eax
push dword [esp + 0x24]
call fcn.00517480
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc