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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x51f90b
sub esp, 0x6c
mov edx, dword [esp + 0x70]
mov ebx, dword [edx]
mov ebp, dword [ebx + 8]
mov ebx, dword [ebx + 4]
lea esi, [ebp - 1]
test esi, esi
jl 0x51f8d9
mov ebx, dword [ebx + ebp*4 - 4]
nop
cmp ebx, 0x10000
jb 0x51f8d2
shr ebx, 0x10
mov eax, 0x10
cmp ebx, 0x100
jb 0x51f8cb
shr ebx, 8
lea ebp, [eax + 8]
cmp ebx, 0x100
jae 0x51f8fe
shl esi, 5
lea eax, [0x5eca20]
movzx ecx, byte [ebx + eax]
add ecx, ebp
add ecx, esi
lea ebx, [ecx + 7]
sar ebx, 0x1f
shr ebx, 0x1d
lea ecx, [ecx + ebx + 7]
sar ecx, 3
mov ebx, dword [esp + 0x88]
cmp ecx, ebx
jne 0x51f8ad
mov byte [esp + 0x5c], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov eax, dword [esp + 0x84]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x14], eax
call fcn.004e92e0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], edx
mov byte [esp + 0x5c], 0
mov byte [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
lea eax, [esp + 0x4c]
mov dword [esp], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 4], eax
lea ecx, [esp + 0x5c]
mov dword [esp + 8], ecx
call fcn.00520030
mov eax, dword [esp + 0x70]
mov eax, dword [eax]
mov ecx, dword [esp + 0xc]
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
lea ebx, [edx - 1]
test ebx, ebx
jl 0x51f8a0
mov edx, dword [eax + edx*4 - 4]
nop
cmp edx, 0x10000
jb 0x51f899
shr edx, 0x10
mov eax, 0x10
cmp edx, 0x100
jb 0x51f892
shr edx, 8
lea ebp, [eax + 8]
cmp edx, 0x100
jae 0x51f8f2
shl ebx, 5
lea esi, [0x5eca20]
movzx edx, byte [edx + esi]
add edx, ebp
add edx, ebx
lea ebx, [edx + 6]
sar ebx, 0x1f
shr ebx, 0x1d
lea ebx, [edx + ebx + 6]
mov ebp, dword [ecx + 8]
mov edi, dword [ecx + 4]
mov eax, edx
lea edx, [ebp - 1]
test edx, edx
jl 0x51f88b
mov ebp, dword [edi + ebp*4 - 4]
nop
cmp ebp, 0x10000
jb 0x51f884
shr ebp, 0x10
mov edi, 0x10
cmp ebp, 0x100
jb 0x51f74a
shr ebp, 8
add edi, 8
cmp ebp, 0x100
jae 0x51f8e6
shl edx, 5
movzx ebp, byte [ebp + esi]
add ebp, edi
add edx, ebp
sar ebx, 3
mov ebp, ebx
shl ebx, 3
cmp edx, ebx
jg 0x51f866
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], ebp
lea eax, [0x643900]
mov dword [esp], eax
mov dword [esp + 4], ebp
mov dword [esp + 8], ebp
call fcn.00444130
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x44]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
call fcn.004de730
mov eax, dword [esp + 0x10]
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x34], ecx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x38], edx
mov ebx, dword [esp + 0x90]
test ebx, ebx
je 0x51f85f
mov ebx, dword [ebx]
mov dword [esp + 0x30], ebx
mov eax, dword [esp + 0x74]
mov dword [esp], eax
call fcn.004d9260
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x78]
mov dword [esp], edx
mov edx, dword [esp + 0x7c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x80]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x48]
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 + 0x40]
dec edx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x30]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
call fcn.0051eb50
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], ecx
add esp, 0x6c
ret
xor ebx, ebx
jmp 0x51f7dd
mov eax, dword [0x7ccc58]
mov ecx, dword [0x7ccc5c]
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], ecx
add esp, 0x6c
ret
xor edi, edi
jmp 0x51f73c
xor edx, edx
jmp 0x51f762
mov ebp, eax
jmp 0x51f6e6
xor eax, eax
jmp 0x51f6d4
lea esi, [0x5eca20]
xor edx, edx
jmp 0x51f703
mov eax, dword [0x7ccc58]
mov ecx, dword [0x7ccc5c]
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], ecx
add esp, 0x6c
ret
mov ebp, eax
jmp 0x51f5bb
xor eax, eax
jmp 0x51f5a9
lea eax, [0x5eca20]
xor ecx, ecx
jmp 0x51f5d8
mov eax, ebp
mov ecx, 0x100
call fcn.0045c9b0
mov eax, edx
mov ecx, 0x100
call fcn.0045c9b0
mov eax, ebx
mov ecx, 0x100
call fcn.0045c9b0
nop
call fcn.0045b380
jmp fcn.0051f560