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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0x10]
cmp eax, dword [ecx + 8]
jbe 0x520224
sub esp, 0x90
mov eax, dword [esp + 0x9c]
xor ebx, ebx
mov dword [esp + 0xa0], ebx
mov dword [esp + 0xa4], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], 0
xor ebx, ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov ebx, dword [esp + 0x98]
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], eax
mov dword [esp + 0x34], 0
mov ebx, dword [esp + 0x34]
mov dword [esp + 0x38], ebx
mov ebx, dword [esp + 0x4c]
mov dword [esp], ebx
mov ebx, dword [esp + 0x50]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0x34]
mov dword [esp + 8], ebx
call fcn.00441330
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x34], ecx
cmp ecx, 0
je 0x520197
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], eax
mov dword [esp], eax
mov edx, dword [esp + 0x94]
mov ebx, dword [edx]
call ebx
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 4]
mov ebx, dword [esp + 0x60]
cmp ebx, 0
jne 0x51ffb9
mov dword [esp + 0x20], esi
mov ebp, dword [esp + 0x30]
cmp esi, ebp
je 0x51fe98
mov dword [esp], 0x5c5000
mov eax, edi
cdq
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, edi
cdq
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
call fcn.0043cbf0
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x9c]
cmp eax, ebx
ja 0x520190
mov ecx, dword [esp + 0x98]
mov edx, eax
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], ebp
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x44], ecx
mov ebp, ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x88], edi
mov eax, edi
mov dword [esp + 0x40], edx
cmp edx, edi
jge 0x51ff8a
mov eax, edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x84], esi
mov dword [esp], esi
mov dword [esp + 0x3c], ebp
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
call fcn.004540c0
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x24], edx
cmp esi, 0
jl 0x51fe98
mov eax, 1
mov dword [esp + 0x20], esi
cmp esi, 0x80
jl 0x51ffe3
mov eax, esi
cmp esi, 0
jge 0x52012a
mov eax, 0xffffffff
mov ebx, edx
add ebx, eax
cmp ebx, edi
jle 0x5200bd
mov ebp, edi
shl ebp, 1
add ebp, 4
mov dword [esp], 0x5c5000
mov eax, ebp
cdq
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, ebp
mov dword [esp + 0x28], ebp
cdq
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
call fcn.0043cbf0
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x68]
cmp ecx, eax
ja 0x520123
mov edx, dword [esp + 0x60]
mov dword [esp + 0x8c], eax
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x80], ebp
mov dword [esp + 0x84], edx
mov ebp, edx
mov dword [esp + 0x88], ecx
mov ebx, dword [esp + 0x8c]
mov dword [esp + 0x74], ebx
mov dword [esp + 0x7c], edi
mov eax, edi
mov dword [esp + 0x70], ecx
cmp ecx, edi
jge 0x520081
mov eax, ecx
mov dword [esp + 0x78], esi
mov dword [esp], esi
mov dword [esp + 0x6c], ebp
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
call fcn.004540c0
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
mov ebx, dword [esp + 0x54]
mov dword [esp + 0x60], ebx
mov ebx, dword [esp + 0x58]
mov dword [esp + 0x64], ebx
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0x68], ebx
mov dword [esp + 0x38], edx
mov eax, edx
mov edx, dword [esp + 0x68]
cmp edi, edx
ja 0x52011c
cmp eax, edi
ja 0x52011c
mov ebp, edi
sub ebp, eax
sub edx, eax
mov ecx, dword [esp + 0x60]
cmp edx, 0
je 0x5200e0
add ecx, eax
mov dword [esp + 0x84], ecx
mov dword [esp], ecx
mov dword [esp + 0x88], ebp
mov dword [esp + 4], ebp
mov dword [esp + 0x8c], edx
mov dword [esp + 8], edx
mov dword [esp + 0xc], esi
call fcn.0054ce80
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x38]
add ebx, ecx
mov dword [esp + 0x24], ebx
jmp 0x51fe98
call fcn.00429210
ud2
call fcn.00429210
ud2
cmp esi, 0x7f
jg 0x520139
mov eax, 1
jmp 0x51ffe3
cmp esi, 0x7ff
jg 0x52014b
mov eax, 2
jmp 0x51ffe3
cmp esi, 0xd800
jl 0x520164
cmp eax, 0xdfff
jg 0x520164
mov eax, 0xffffffff
jmp 0x51ffe3
cmp eax, 0xffff
jg 0x520175
mov eax, 3
jmp 0x51ffe3
cmp eax, 0x10ffff
jg 0x520186
mov eax, 4
jmp 0x51ffe3
mov eax, 0xffffffff
jmp 0x51ffe3
call fcn.00429210
ud2
mov ebx, dword [esp + 0x60]
cmp ebx, 0
jne 0x5201c3
mov ebx, dword [esp + 0x98]
mov dword [esp + 0xa0], ebx
mov ebx, dword [esp + 0x9c]
mov dword [esp + 0xa4], ebx
add esp, 0x90
ret
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x68]
cmp eax, ecx
ja 0x52021d
mov edx, dword [esp + 0x60]
mov dword [esp], 0
mov dword [esp + 0x84], edx
mov dword [esp + 4], edx
mov dword [esp + 0x88], eax
mov dword [esp + 8], eax
mov dword [esp + 0x8c], ecx
mov dword [esp + 0xc], ecx
call fcn.00440a30
mov ebx, dword [esp + 0x10]
mov dword [esp + 0xa0], ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0xa4], ebx
add esp, 0x90
ret
call fcn.00429210
ud2
call fcn.004518d0
jmp fcn.0051fe30