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

Disassembly:
sub esp, 0x124
mov eax, dword [0x58cb30]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
push ebp
push edi
mov edi, dword [esp + 0x134]
mov eax, ecx
xor ecx, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x124], ecx
mov dword [esp + 0x128], ecx
mov ecx, dword [edi + 0x14]
inc dword [edi + 0x18]
mov ebp, dword [edi + 8]
mov dword [esp + 0x14], 0x3b000
mov dword [esp + 0x18], 0x3fb000
mov dword [esp + 0x1c], 0x3c3000
mov dword [esp + 0x20], 0x3000
mov dword [esp + 0x24], 0x3c00
mov dword [esp + 0x28], 0x3f00
mov dword [esp + 0x2c], 0x3f80
mov dword [esp + 0x30], 0x77c0
mov dword [esp + 0x34], 0xf7e0
mov dword [esp + 0x38], 0x1b7f0
mov dword [esp + 0x3c], 0x3b7f0
mov dword [esp + 0x40], 0x7b7f8
mov dword [esp + 0x44], 0xfb7f8
mov dword [esp + 0x48], 0x1ffc78
mov dword [esp + 0x4c], 0xc7818
mov dword [esp + 0x50], 0xffffc
mov dword [esp + 0x54], 0x7fff8
mov dword [esp + 0x58], 0x3000
mov dword [esp + 0x5c], 0x3000
mov dword [esp + 0x60], 0x3b000
mov dword [esp + 0x64], 0x3fb000
mov dword [esp + 0x68], 0x3c3c00
mov dword [esp + 0x6c], 0x3f00
mov dword [esp + 0x70], 0x3f80
mov dword [esp + 0x74], 0x77c0
mov dword [esp + 0x78], 0xf7e0
mov dword [esp + 0x7c], 0x1b7f0
mov dword [esp + 0x80], 0x3b7f0
mov dword [esp + 0x84], 0x7b7f8
mov dword [esp + 0x88], 0xfb7f8
mov dword [esp + 0x8c], 0x1ffc78
mov dword [esp + 0x90], 0xc7818
mov dword [esp + 0x94], 0xffffc
mov dword [esp + 0x98], 0x7fff8
mov dword [esp + 0x9c], 0x38000
mov dword [esp + 0xa0], 0x3f8000
mov dword [esp + 0xa4], 0x3c0000
mov dword [esp + 0xa8], 0
mov dword [esp + 0xac], 0xc00
mov dword [esp + 0xb0], 0xf00
mov dword [esp + 0xb4], 0xf80
mov dword [esp + 0xb8], 0x47c0
mov dword [esp + 0xbc], 0xc7e0
mov dword [esp + 0xc0], 0x187f0
mov dword [esp + 0xc4], 0x387f0
mov dword [esp + 0xc8], 0x787f8
mov dword [esp + 0xcc], 0xf87f8
mov dword [esp + 0xd0], 0x1fcc78
mov dword [esp + 0xd4], 0xc4818
mov dword [esp + 0xd8], 0
mov dword [esp + 0xdc], 0
mov dword [esp + 0xe0], 0
mov dword [esp + 0xe4], 0
mov dword [esp + 0xe8], 0x38000
mov dword [esp + 0xec], 0x3f8000
mov dword [esp + 0xf0], 0x3c0c00
mov dword [esp + 0xf4], 0xf00
mov dword [esp + 0xf8], 0xf80
mov dword [esp + 0xfc], 0x47c0
mov dword [esp + 0x100], 0xc7e0
mov dword [esp + 0x104], 0x187f0
mov dword [esp + 0x108], 0x387f0
mov dword [esp + 0x10c], 0x787f8
mov dword [esp + 0x110], 0xf87f8
mov dword [esp + 0x114], 0x1fcc78
mov dword [esp + 0x118], 0xc4818
mov dword [esp + 0x11c], 0
mov dword [esp + 0x120], 0
mov dword [esp + 0xc], ecx
xor ebx, ebx
test ebp, ebp
sete bl
lea ebx, [ebx*2 - 1]
add ebx, dword [edi + 0x10]
cmp ebx, 0xffffffe0
jl 0x5132b2
cmp ebx, dword [eax + 0xe54]
jge 0x5132b2
xor edx, edx
lea ecx, [eax + 0x10]
push esi
cmp dword [ecx - 8], 1
jne 0x513234
cmp dword [ecx], ebp
je 0x513234
mov esi, dword [ecx + 8]
mov eax, esi
sub eax, ebx
jns 0x51322f
mov eax, ebx
sub eax, esi
cmp eax, 0x46
jb 0x5132a5
inc edx
add ecx, 0x24
cmp edx, 0x64
jb 0x513218
lea ecx, [esp + 0xa0]
lea esi, [esp + 0x18]
test ebp, ebp
mov ebp, dword [esp + 0x14]
setne al
movzx eax, al
push eax
mov eax, dword [ebp + 0xe54]
sub eax, ebx
shr eax, 4
add al, 0x32
movzx eax, al
push eax
mov eax, ebx
cdq
and edx, 7
add eax, edx
sar eax, 3
add al, 0x64
push 0x50
movzx eax, al
push eax
push dword [esp + 0x20]
mov eax, ebx
cdq
and edx, 0x3f
push ebx
add eax, edx
push 0x11
sar eax, 6
add eax, 0xa
push eax
push ecx
push esi
mov ecx, ebp
call fcn.00513770
mov eax, dword [esp + 0x10]
mov dword [edi + 0x10], ebx
mov dword [edi + 0x14], eax
pop esi
jmp 0x5132b8
lea ecx, [esp + 0xe8]
lea esi, [esp + 0x5c]
jmp 0x513248
mov dword [edi], 0
mov ecx, dword [esp + 0x12c]
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.00530218
add esp, 0x124
ret 4