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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x51e098
sub esp, 0x64
mov eax, dword [esp + 0x68]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
mov ecx, dword [ecx + 4]
lea ebx, [edx - 1]
test ebx, ebx
jl 0x51e069
mov ecx, dword [ecx + edx*4 - 4]
cmp ecx, 0x10000
jb 0x51e062
shr ecx, 0x10
mov edx, 0x10
cmp ecx, 0x100
jb 0x51de06
shr ecx, 8
add edx, 8
cmp ecx, 0x100
jae 0x51e091
shl ebx, 5
lea ebp, [0xb49640]
movzx ecx, byte [ecx + ebp]
add ecx, edx
add ecx, ebx
lea edx, [ecx + 7]
sar edx, 0x1f
shr edx, 0x1d
lea edx, [edx + ecx + 7]
sar edx, 3
mov ebx, dword [esp + 0x80]
cmp ebx, edx
jne 0x51e044
mov dword [esp + 0x30], ecx
mov byte [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
lea eax, [esp + 0x54]
mov dword [esp], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 4], eax
mov dword [esp + 8], ebx
mov eax, dword [esp + 0x84]
mov dword [esp + 0xc], eax
call fcn.004e8d50
mov eax, dword [esp + 0x10]
mov byte [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
lea ecx, [esp + 0x44]
mov dword [esp], ecx
mov ecx, dword [esp + 0x68]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.0051f600
mov eax, dword [esp + 0xc]
mov dword [esp + 0x3c], eax
mov dword [esp], eax
call fcn.004e8de0
mov eax, dword [esp + 0x30]
lea ecx, [eax + 6]
sar ecx, 0x1f
shr ecx, 0x1d
lea ecx, [ecx + eax + 6]
sar ecx, 3
mov edx, dword [esp + 8]
cmp ecx, edx
jl 0x51e026
lea eax, [0x7b4b60]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], ecx
call fcn.00438a20
mov eax, dword [esp + 0x14]
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x34], ecx
mov edx, dword [esp + 0xc]
mov dword [esp + 0x40], edx
mov ebx, dword [esp + 0x3c]
mov dword [esp], ebx
call fcn.004e8de0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
mov ebx, dword [esp + 0x40]
mov dword [esp], ebx
mov ebp, dword [esp + 0x34]
mov dword [esp + 4], ebp
mov esi, dword [esp + 0x38]
mov dword [esp + 8], esi
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
call fcn.0051cf20
mov eax, dword [esp + 0x88]
cmp eax, 0xffffffff
jne 0x51e016
mov eax, dword [esp + 0x6c]
lea ecx, [eax - 1]
cmp ecx, 0x13
jae 0x51e077
mov ecx, dword [0xb78960]
mov edx, dword [0xb78964]
cmp eax, edx
jae 0x51e070
movzx ecx, byte [ecx + eax]
mov dword [esp + 0x88], ecx
mov dword [esp], eax
call fcn.004d6150
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x70]
mov dword [esp], edx
mov edx, dword [esp + 0x74]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x78]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x40]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x30]
dec edx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x88]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
call fcn.0051d380
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], ecx
add esp, 0x64
ret
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x88]
jmp 0x51df95
mov eax, dword [0xb801ac]
mov ecx, dword [0xb801a8]
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], eax
add esp, 0x64
ret
mov eax, dword [0xb801a8]
mov ecx, dword [0xb801ac]
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], ecx
add esp, 0x64
ret
xor edx, edx
jmp 0x51ddf8
xor ecx, ecx
jmp 0x51de23
call fcn.004264e0
ud2
lea eax, [0x7b48a0]
mov dword [esp], eax
lea eax, [0x8b0d58]
mov dword [esp + 4], eax
call fcn.004273c0
ud2
call fcn.004264e0
ud2
call fcn.0044b230
jmp fcn.0051ddb0