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

Disassembly:
sub esp, 0x60
mov ecx, dword [esp + 0x90]
or eax, 0xffffffff
push ebx
mov ebx, dword [esp + 0x68]
push ebp
mov ebp, dword [esp + 0x84]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov eax, dword [ebx + 0x1c8]
push esi
mov esi, dword [esp + 0x84]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x98]
push edi
mov edx, esi
mov edi, esi
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], ebp
test eax, eax
je 0x51dc4e
test ecx, ecx
je 0x51dc4e
jmp 0x51dc30
mov esi, dword [esp + 0x98]
dec ecx
cmp dword [eax], esi
je 0x51de88
add eax, 4
test ecx, ecx
jne 0x51dc30
mov esi, dword [esp + 0x88]
xor eax, eax
cmp dword [esp + 0x84], ebp
mov dword [esp + 0x74], eax
mov dword [esp + 0x14], eax
jg 0x51dc76
mov ebp, dword [esp + 0x80]
jl 0x51dffb
cmp ebp, esi
jb 0x51dffb
mov esi, dword [esp + 0x10]
mov ebp, dword [esp + 0x2c]
lea eax, [esi + 1]
mov dword [ebx + 8], edi
mov dword [ebx + 0xc], ebp
cmp eax, esi
je 0x51dccc
jmp 0x51dc90
mov eax, dword [esp + 0xa0]
lea ecx, [esp + 0x38]
push ecx
mov ecx, dword [esp + 0xa0]
lea edx, [esp + 0x84]
push edx
push eax
push ecx
push ebx
mov dword [esp + 0x94], esi
call fcn.0051ca40
add esp, 0x14
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], edx
cmp dword [esp + 0x80], esi
jne 0x51dc90
mov edx, dword [ebx + 8]
cmp edx, edi
jne 0x51dcda
mov eax, dword [ebx + 0xc]
cmp eax, ebp
je 0x51dcf1
push ebp
push edi
mov esi, ebx
call fcn.0051bf80
cdq
mov ecx, eax
add esp, 8
or ecx, edx
jne 0x51de80
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x5c]
push edx
push ebx
xor eax, eax
call fcn.0051c650
cdq
mov ecx, eax
add esp, 0x14
or ecx, edx
jne 0x51de80
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
mov esi, dword [ebx + 0x1c8]
lea ecx, [esp + 0x50]
mov dword [esp + 0x84], eax
push ecx
mov eax, ebx
mov dword [esp + 0x84], edx
call fcn.0051c510
mov ebp, dword [esp + 0xa8]
mov ecx, dword [esp + 0x78]
add esp, 4
mov dword [esp + 0x34], edx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x14]
lea edx, [ebp + 1]
push edx
mov edx, dword [esp + 0x9c]
push eax
mov eax, dword [esp + 0x9c]
push ecx
mov ecx, dword [esp + 0x9c]
push edx
mov edx, dword [esp + 0x9c]
push eax
mov eax, dword [esp + 0x9c]
push ecx
mov ecx, dword [ebx + 0xc]
push edx
mov edx, dword [ebx + 8]
push eax
mov eax, dword [esp + 0x4c]
push ecx
push edx
push eax
push edi
push ebx
call fcn.0051dbd0
cdq
mov ecx, eax
add esp, 0x34
or ecx, edx
jne 0x51de80
mov eax, dword [esp + 0x74]
test eax, eax
je 0x51ddbc
push eax
call fcn.004eb9bf
add esp, 4
mov eax, dword [ebx + 0x38]
mov edx, dword [esp + 0x2c]
mov dword [eax + ebp*8 + 8], edi
mov dword [eax + ebp*8 + 0xc], edx
mov eax, dword [ebx + 0x40]
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x84]
mov dword [eax + ebp*4 + 4], esi
mov eax, dword [ebx + 0x3c]
mov dword [eax + ebp*8 + 8], ecx
mov dword [eax + ebp*8 + 0xc], edx
mov edx, dword [esp + 0x1c]
lea edi, [ebp + 1]
shl edi, 5
add edi, dword [ebx + 0x48]
shl ebp, 4
mov ecx, 8
lea esi, [esp + 0x50]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 0x4c]
mov ecx, dword [esp + 0x18]
mov dword [eax + ebp + 0x10], ecx
mov ecx, dword [esp + 0x20]
mov dword [eax + ebp + 0x14], edx
mov edx, dword [esp + 0x24]
mov dword [eax + ebp + 0x18], ecx
mov ecx, dword [esp + 0x38]
lea eax, [eax + ebp + 0x10]
mov dword [eax + 0xc], edx
mov eax, dword [ebx + 0x44]
mov edx, dword [esp + 0x3c]
mov dword [eax + ebp + 8], ecx
mov ecx, dword [esp + 0x30]
mov dword [eax + ebp + 0xc], edx
mov eax, dword [ebx + 0x44]
mov edx, dword [esp + 0x34]
mov dword [eax + ebp + 0x10], ecx
mov dword [eax + ebp + 0x14], edx
mov eax, dword [ebx + 0x44]
sub dword [eax + ebp + 0x18], ecx
lea eax, [eax + ebp + 0x18]
sbb dword [eax + 4], edx
mov ecx, dword [ebx + 0x44]
cmp dword [ecx + ebp + 0x1c], 0
lea eax, [ecx + ebp + 0x18]
jg 0x51de7e
jl 0x51de71
cmp dword [eax], 0
jae 0x51de7e
mov dword [eax], 0
mov dword [eax + 4], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
mov edi, dword [esp + 0x10]
cmp esi, edi
je 0x51ded8
mov esi, dword [esp + 0xa0]
jmp 0x51dea0
mov eax, dword [esp + 0x9c]
lea ecx, [esp + 0x90]
push ecx
lea edx, [esp + 0x9c]
push edx
push esi
push eax
push ebx
mov dword [esp + 0xac], edi
call fcn.0051ca40
add esp, 0x14
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], edx
cmp dword [esp + 0x98], edi
jne 0x51dea0
mov esi, dword [esp + 0xa4]
mov eax, dword [ebx + 0x38]
lea ecx, [esi + 1]
mov dword [ebx + 0x34], ecx
test eax, eax
je 0x51def5
push eax
call fcn.004eb9bf
add esp, 4
mov eax, dword [ebx + 0x40]
test eax, eax
je 0x51df05
push eax
call fcn.004eb9bf
add esp, 4
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x51df15
push eax
call fcn.004eb9bf
add esp, 4
mov edx, dword [ebx + 0x34]
lea eax, [edx*8 + 8]
push eax
call fcn.004eb6da
mov ecx, dword [ebx + 0x34]
mov edx, dword [ebx + 0x48]
add esp, 4
shl ecx, 5
push ecx
push edx
mov dword [ebx + 0x38], eax
call fcn.004eb7a4
mov ecx, dword [ebx + 0x4c]
mov dword [ebx + 0x48], eax
mov eax, dword [ebx + 0x34]
shl eax, 4
push eax
push ecx
call fcn.004eb7a4
mov edx, dword [ebx + 0x34]
add edx, edx
add edx, edx
push edx
mov dword [ebx + 0x4c], eax
call fcn.004eb6da
mov dword [ebx + 0x40], eax
mov eax, dword [ebx + 0x34]
add eax, eax
add eax, eax
add eax, eax
add esp, 0x14
push eax
call fcn.004eb6da
mov ecx, dword [ebx + 0x34]
shl ecx, 4
add esp, 4
push ecx
mov dword [ebx + 0x3c], eax
call fcn.004eb6da
mov edx, dword [esp + 0x8c]
mov ecx, dword [esp + 0x7c]
mov dword [ebx + 0x44], eax
mov eax, dword [ebx + 0x38]
mov dword [eax + esi*8 + 8], edx
mov edx, dword [esp + 0x80]
mov dword [eax + esi*8 + 0xc], ebp
mov eax, dword [ebx + 0x38]
mov dword [eax + esi*8], ecx
mov ecx, dword [esp + 0x98]
add esp, 4
mov dword [eax + esi*8 + 4], edx
mov eax, dword [esp + 0x90]
test ecx, ecx
jg 0x51dfce
jl 0x51dfca
test eax, eax
jae 0x51dfce
xor eax, eax
xor ecx, ecx
mov ebx, dword [ebx + 0x44]
shl esi, 4
mov dword [esi + ebx + 8], eax
mov dword [esi + ebx + 0xc], ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
mov edx, dword [esp + 0x18]
mov ebp, dword [esp + 0x80]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x84]
mov ecx, edx
sub ecx, ebp
mov eax, esi
sbb eax, edi
test eax, eax
jg 0x51e024
jl 0x51e01c
cmp ecx, 0x10000
jae 0x51e024
mov esi, edi
mov dword [esp + 0x34], esi
jmp 0x51e03b
push 0
add edx, ebp
push 2
adc esi, edi
push esi
push edx
call fcn.004e8370
mov ebp, eax
mov dword [esp + 0x34], edx
mov esi, edx
cmp ebp, dword [ebx + 8]
jne 0x51e045
cmp esi, dword [ebx + 0xc]
je 0x51e099
mov ecx, dword [ebx]
test ecx, ecx
je 0x51e089
mov eax, dword [ebx + 0x2c4]
test eax, eax
je 0x51e082
push 0
push esi
push ebp
push ecx
call eax
add esp, 0x10
cmp eax, 0xffffffff
je 0x51e082
xor eax, eax
mov dword [ebx + 8], ebp
mov dword [ebx + 0xc], esi
cmp dword [ebx + 0x1c], eax
jl 0x51e08e
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x24], eax
mov dword [ebx + 0x28], eax
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x30], eax
jmp 0x51e08e
mov eax, 0xffffff80
jmp 0x51e08e
mov eax, 0xffffff7f
cdq
mov ecx, eax
or ecx, edx
jne 0x51de80
push 0xffffffffffffffff
lea edx, [esp + 0x44]
push 0xffffffffffffffff
push edx
mov edi, ebx
call fcn.0051c060
add esp, 0xc
cmp eax, 0xffffff80
jne 0x51e0ba
cmp edx, 0xffffffff
je 0x51e16d
test edx, edx
jl 0x51e110
jg 0x51e0c4
test eax, eax
jb 0x51e110
mov esi, dword [esp + 0x40]
movzx ecx, byte [esi + 0x11]
movzx edi, byte [esi + 0x10]
shl ecx, 8
or ecx, edi
movzx edi, byte [esi + 0xf]
movzx esi, byte [esi + 0xe]
shl ecx, 8
or ecx, edi
mov edi, dword [esp + 0xa0]
shl ecx, 8
or ecx, esi
mov esi, dword [esp + 0x9c]
test esi, esi
je 0x51e10c
test edi, edi
je 0x51e10c
lea ecx, [ecx]
dec edi
cmp dword [esi], ecx
je 0x51e157
add esi, 4
test edi, edi
jne 0x51e100
mov esi, dword [esp + 0x34]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], esi
test edx, edx
jl 0x51e12a
jg 0x51e122
test eax, eax
jb 0x51e12a
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x84]
cmp edx, dword [esp + 0x1c]
jl 0x51dff0
jg 0x51e14e
mov eax, dword [esp + 0x80]
cmp eax, dword [esp + 0x18]
jb 0x51dff0
mov edi, dword [esp + 0x28]
jmp 0x51dc76
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], ecx
jmp 0x51e12a
pop edi
pop esi
pop ebp
mov eax, 0xffffff80
pop ebx
add esp, 0x60
ret