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

Disassembly:
sub esp, 0x28
imul eax, dword [esp + 0x2c], 0xcc
push ebx
add eax, edx
mov dword [esp + 0xc], edx
mov ebx, ecx
mov dword [esp + 0x28], eax
push esi
push edi
mov edi, dword [eax + 0xc8]
test byte [ebx + 0x10], 8
mov esi, dword [eax + 0xcc]
mov dword [esp + 0x2c], edi
jne 0x10051fa7
mov ecx, dword [ebx]
mov edx, edi
push ebp
call fcn.10039080
mov ecx, dword [ebx + 4]
mov edx, edi
lea ebp, [esi + eax]
mov dword [esp + 0x1c], ebp
call fcn.10039080
mov ecx, dword [esp + 0x3c]
mov edi, eax
mov dword [esp + 0x24], edi
test ecx, ecx
jne 0x10051ca0
mov eax, dword [esp + 0x40]
cmp byte [eax + 0x78], cl
je 0x10051cb3
cmp byte [eax + 0x7a], cl
jne 0x10051cd1
mov dword [esp + 0x28], 0
xor eax, eax
mov dword [ebx + 0xc], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
cmp ecx, 1
jne 0x10051dc2
mov ecx, dword [esp + 0x18]
mov ebp, dword [ebx]
add ebp, dword [ebx + 4]
mov dword [esp + 0x14], eax
mov al, byte [ecx + 0x9bc]
mov esi, dword [ecx + 0x19c]
add ecx, 0x1a0
mov byte [esp + 0x13], al
test esi, esi
je 0x10051d00
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0x9b8]
neg eax
mov dword [esp + 0x2c], eax
mov edx, ebp
sub edx, dword [ecx + 0xc]
cmp edx, eax
jl 0x10051d00
mov edi, dword [esp + 0x18]
mov eax, dword [ecx + 8]
add eax, dword [edi + 0x9b8]
mov edi, dword [esp + 0x24]
cmp ebp, eax
jle 0x10051cde
mov eax, dword [esp + 0x2c]
add ecx, 0x20
sub esi, 1
jne 0x10051c70
jmp 0x10051d00
cmp ecx, 1
jne 0x10051c17
mov eax, dword [esp + 0x40]
cmp byte [eax + 0x79], 0
jne 0x10051cc7
or dword [ebx + 0x10], 8
mov dword [ebx + 8], ebp
pop ebp
mov dword [ebx + 0xc], edi
pop edi
pop esi
pop ebx
add esp, 0x28
ret 8
cmp byte [eax + 0x7b], 0
je 0x10051c17
mov dword [esp + 0x28], 1
jmp 0x10051c1f
cmp byte [esp + 0x13], 0
jne 0x10051cf1
mov eax, dword [esp + 0x18]
cmp edx, dword [eax + 0x9b4]
jg 0x10051d00
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x14], 1
mov dword [esp + 0x20], eax
mov esi, dword [esp + 0x18]
xor edx, edx
mov ebp, dword [esi + 0x3a0]
lea ecx, [esi + 0x384]
mov eax, ebp
shl eax, 5
add ecx, eax
test ebp, ebp
je 0x10051d5c
mov eax, dword [esi + 0x9b8]
neg eax
mov dword [esp + 0x2c], eax
nop dword [eax]
mov esi, dword [ecx + 8]
sub esi, dword [ebx]
cmp esi, eax
jl 0x10051d5c
mov edi, dword [esp + 0x18]
mov eax, dword [ecx + 0xc]
sub eax, dword [edi + 0x9b8]
mov edi, dword [esp + 0x24]
cmp dword [ebx], eax
jge 0x10051d82
mov eax, dword [esp + 0x2c]
sub ecx, 0x20
sub ebp, 1
jne 0x10051d30
xor edx, edx
mov eax, dword [esp + 0x14]
sub eax, 1
je 0x10051dae
sub eax, 1
je 0x10051da6
sub eax, 1
jne 0x10051dbe
mov esi, dword [esp + 0x20]
lea ebp, [ebx + 8]
mov eax, esi
sub eax, edx
mov dword [ebx + 0xc], eax
jmp 0x10051f24
cmp byte [esp + 0x13], dl
jne 0x10051d96
mov eax, dword [esp + 0x18]
xor edx, edx
cmp esi, dword [eax + 0x9b4]
jge 0x10051d5c
mov eax, dword [esp + 0x14]
mov edx, dword [ecx + 0x10]
or eax, 2
mov dword [esp + 0x14], eax
jmp 0x10051d60
lea ebp, [ebx + 8]
jmp 0x10051f20
mov esi, dword [esp + 0x20]
lea ebp, [ebx + 8]
mov edx, esi
sub edx, edi
jmp 0x10051f24
mov ecx, dword [esp + 0x3c]
mov ebp, dword [ebx + 0x14]
test ebp, ebp
je 0x10051e11
test byte [ebp + 0x10], 8
jne 0x10051ddf
push dword [esp + 0x40]
mov edx, dword [esp + 0x1c]
push ecx
mov ecx, ebp
call fcn.10051ba0
mov eax, dword [ebp + 4]
mov ecx, dword [ebx + 4]
mov esi, dword [ebp + 0xc]
mov edx, dword [esp + 0x30]
sar ecx, 1
add ecx, dword [ebx]
sar eax, 1
add eax, dword [ebp]
sar esi, 1
sub ecx, eax
add esi, dword [ebp + 8]
call fcn.10039080
mov ecx, eax
mov eax, edi
sar eax, 1
sub esi, eax
add ecx, esi
mov dword [esp + 0x1c], ecx
jmp 0x10051e15
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x40]
lea ebp, [ebx + 8]
mov dword [ebp], ecx
mov dword [ebx + 0xc], edi
cmp byte [eax + 0x7c], 0
je 0x10051ee8
cmp edi, 0x40
jg 0x10051e88
cmp edi, 0x20
jl 0x10051e4b
sar edi, 1
add ecx, edi
mov edi, 0x40
and ecx, 0xffffffc0
mov dword [esp + 0x1c], ecx
jmp 0x10051ee8
lea edx, [ecx + 0x20]
and edx, 0xffffffc0
test edi, edi
jle 0x10051e80
lea ebp, [ecx + 0x20]
mov esi, edx
add ebp, edi
and ebp, 0xffffffc0
mov eax, ebp
sub eax, edi
sub eax, ecx
sub esi, ecx
jns 0x10051e6d
mov esi, ecx
sub esi, edx
test eax, eax
jns 0x10051e73
neg eax
cmp esi, eax
mov ecx, ebp
cmovle ecx, edx
mov dword [esp + 0x1c], ecx
jmp 0x10051ee5
mov ecx, edx
mov dword [esp + 0x1c], ecx
jmp 0x10051ee8
mov esi, dword [esp + 0x34]
mov eax, edi
mov edx, edi
mov esi, dword [esi + 0xc]
sub eax, esi
jns 0x10051e9b
mov eax, esi
sub eax, edi
cmp eax, 0x28
jge 0x10051eb0
mov edx, esi
cmp edx, 0x30
jge 0x10051eb0
xor edi, edi
mov edi, 0x36
jmp 0x10051ee5
mov edi, edx
cmp edi, 0xc0
jae 0x10051edf
mov eax, edi
and edi, 0xffffffc0
and eax, 0x3f
cmp eax, 0xa
jae 0x10051ecb
add edi, eax
jmp 0x10051ee5
cmp eax, 0x20
jae 0x10051ed5
add edi, 0xa
jmp 0x10051ee5
cmp eax, 0x36
jae 0x10051ec7
add edi, 0x36
jmp 0x10051ee5
lea edi, [edx + 0x20]
and edi, 0xffffffc0
lea ebp, [ebx + 8]
lea esi, [ecx + 0x20]
mov dword [ebx + 0xc], edi
lea eax, [ecx + 0x20]
add esi, edi
and eax, 0xffffffc0
and esi, 0xffffffc0
mov dword [esp + 0x40], eax
sub esi, edi
mov eax, esi
sub eax, ecx
cdq
mov ecx, eax
mov eax, dword [esp + 0x40]
sub eax, dword [esp + 0x1c]
xor ecx, edx
sub ecx, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x40]
cmp eax, ecx
cmovg edx, esi
mov esi, dword [esp + 0x20]
cmp dword [esp + 0x28], 0
mov dword [ebp], edx
je 0x10051fa2
mov ecx, dword [ebx + 0xc]
cmp ecx, 0x40
jge 0x10051f3d
mov ecx, 0x40
jmp 0x10051f43
add ecx, 0x20
and ecx, 0xffffffc0
mov eax, dword [esp + 0x14]
sub eax, 1
je 0x10051f9a
sub eax, 1
je 0x10051f9f
sub eax, 1
je 0x10051fa2
mov esi, ecx
sar esi, 1
lea eax, [esi + edx]
test cl, 0x40
je 0x10051f7e
and eax, 0xffffffc0
mov dword [ebx + 0xc], ecx
add eax, 0x20
sub eax, esi
or dword [ebx + 0x10], 8
mov dword [ebp], eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret 8
add eax, 0x20
mov dword [ebx + 0xc], ecx
and eax, 0xffffffc0
sub eax, esi
or dword [ebx + 0x10], 8
mov dword [ebp], eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret 8
sub esi, ecx
mov dword [ebp], esi
mov dword [ebx + 0xc], ecx
or dword [ebx + 0x10], 8
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret 8