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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov eax, ebx
mov ecx, esi
call fcn.004605c7
test al, al
jne 0x50a3e0
xor al, al
jmp 0x50a980
cmp dword [esi], 3
jne 0x50a3d9
mov eax, dword [ebx]
cmp eax, 8
je 0x50a3f1
cmp eax, 9
jne 0x50a3d9
mov eax, esi
lea edi, [esp + 0x60]
call fcn.0045fe6c
push ebx
lea eax, [esp + 0x78]
push eax
call fcn.00425926
mov edi, ebx
lea esi, [esp + 0x40]
call fcn.0045ff26
lea esi, [esp + 0x50]
call fcn.0045ff74
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
cmp eax, 2
push 7
mov dword [esp + 0x30], eax
pop esi
jl 0x50a787
lea ecx, [esp + 0x60]
call fcn.0042590f
test al, al
je 0x50a3d9
lea ecx, [esp + 0x74]
call fcn.0042590f
test al, al
je 0x50a3d9
lea ecx, [esp + 0x40]
call fcn.0042590f
test al, al
je 0x50a3d9
lea ecx, [esp + 0x50]
call fcn.0042590f
test al, al
je 0x50a3d9
mov eax, dword [esp + 0x68]
mov ebx, eax
add eax, dword [esp + 0x6c]
mov dword [esp + 0x68], eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x1c], eax
add eax, dword [esp + 0x80]
mov dword [esp + 0x7c], eax
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
cmp eax, 2
jl 0x50a67c
mov ecx, eax
shr ecx, 1
mov dword [esp + 0x3c], ecx
neg ecx
lea eax, [eax + ecx*2]
mov dword [esp + 0x34], eax
mov ax, word [ebx]
mov word [esp + 0xc], ax
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0xc]
shr ecx, 2
shr eax, 7
movzx edi, cl
mov cl, byte [esp + 0xc]
movzx eax, al
shr edx, 0xc
and edx, esi
or edx, eax
shl cl, 3
and eax, esi
or eax, edi
movzx ecx, cl
and edi, esi
or ecx, edi
push edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
call fcn.004665ce
mov ecx, dword [esp + 0x1c]
mov byte [ecx], al
mov ax, word [ebx + 2]
mov word [esp + 0xc], ax
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0xc]
shr ecx, 2
shr eax, 7
movzx edi, cl
mov cl, byte [esp + 0xc]
movzx eax, al
shr edx, 0xc
and edx, esi
or edx, eax
add dword [esp + 0x18], edx
shl cl, 3
and eax, esi
or eax, edi
add dword [esp + 0x10], eax
movzx ecx, cl
and edi, esi
or ecx, edi
add dword [esp + 0x14], ecx
push edx
call fcn.004665ce
mov ecx, dword [esp + 0x1c]
mov byte [ecx + 1], al
mov eax, dword [esp + 0x20]
mov ax, word [eax]
mov word [esp + 0xc], ax
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0xc]
shr ecx, 2
shr eax, 7
movzx edi, cl
mov cl, byte [esp + 0xc]
movzx eax, al
shr edx, 0xc
and edx, esi
or edx, eax
add dword [esp + 0x18], edx
shl cl, 3
and eax, esi
or eax, edi
add dword [esp + 0x10], eax
movzx ecx, cl
and edi, esi
or ecx, edi
add dword [esp + 0x14], ecx
push edx
call fcn.004665ce
mov edi, dword [esp + 0x30]
mov byte [edi], al
mov eax, dword [esp + 0x20]
mov ax, word [eax + 2]
mov word [esp + 0xc], ax
mov ecx, dword [esp + 0xc]
mov eax, ecx
shr eax, 7
movzx eax, al
shr ecx, 0xc
and ecx, esi
or ecx, eax
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0xc]
push dword [esp + 0x38]
shr ecx, 2
movzx edx, cl
and eax, esi
or eax, edx
mov dword [esp + 0x34], eax
mov al, byte [esp + 0x10]
shl al, 3
movzx ecx, al
mov eax, dword [esp + 0x3c]
add dword [esp + 0x1c], eax
mov eax, dword [esp + 0x34]
add dword [esp + 0x14], eax
and edx, esi
or ecx, edx
add dword [esp + 0x18], ecx
call fcn.004665ce
push dword [esp + 0x14]
mov edx, dword [esp + 0x14]
push dword [esp + 0x1c]
mov byte [edi + 1], al
push 2
pop ecx
call fcn.004665f0
push dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
push dword [esp + 0x1c]
mov edx, dword [esp + 0x1c]
push 2
mov byte [ecx], al
pop ecx
call fcn.00466627
inc dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
inc dword [esp + 0x28]
add dword [esp + 0x20], 4
add dword [esp + 0x1c], 2
add ebx, 4
inc edi
inc edi
dec dword [esp + 0x3c]
mov byte [ecx], al
mov dword [esp + 0x30], edi
jne 0x50a4c2
mov eax, dword [esp + 0x34]
test eax, eax
je 0x50a754
mov ax, word [ebx]
mov word [esp + 0xc], ax
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0xc]
shr ecx, 2
shr eax, 7
movzx edi, cl
mov cl, byte [esp + 0xc]
movzx eax, al
shr edx, 0xc
and edx, esi
or edx, eax
shl cl, 3
and eax, esi
or eax, edi
movzx ecx, cl
and edi, esi
or ecx, edi
push edx
mov ebx, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
call fcn.004665ce
mov ecx, dword [esp + 0x1c]
mov byte [ecx], al
mov eax, dword [esp + 0x20]
mov ax, word [eax]
mov word [esp + 0xc], ax
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0xc]
shr ecx, 2
shr eax, 7
movzx edi, cl
mov cl, byte [esp + 0xc]
movzx eax, al
shr edx, 0xc
and edx, esi
or edx, eax
shl cl, 3
and eax, esi
or eax, edi
add dword [esp + 0x10], eax
movzx ecx, cl
and edi, esi
or ecx, edi
add dword [esp + 0x14], ecx
push edx
add ebx, edx
call fcn.004665ce
mov ecx, dword [esp + 0x30]
push dword [esp + 0x14]
mov edx, dword [esp + 0x14]
mov byte [ecx], al
xor ecx, ecx
push ebx
inc ecx
call fcn.004665f0
mov ecx, dword [esp + 0x24]
push dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov byte [ecx], al
xor ecx, ecx
push ebx
inc ecx
call fcn.00466627
mov ecx, dword [esp + 0x28]
mov byte [ecx], al
mov eax, dword [esp + 0x6c]
add dword [esp + 0x68], eax
mov eax, dword [esp + 0x80]
add dword [esp + 0x7c], eax
mov eax, dword [esp + 0x4c]
add dword [esp + 0x48], eax
mov eax, dword [esp + 0x5c]
sub dword [esp + 0x2c], 2
add dword [esp + 0x58], eax
cmp dword [esp + 0x2c], 2
jge 0x50a431
cmp dword [esp + 0x2c], 0
je 0x50a97e
lea ecx, [esp + 0x60]
call fcn.0042590f
test al, al
je 0x50a3d9
lea ecx, [esp + 0x74]
call fcn.0042590f
test al, al
je 0x50a3d9
lea ecx, [esp + 0x40]
call fcn.0042590f
test al, al
je 0x50a3d9
lea ecx, [esp + 0x50]
call fcn.0042590f
test al, al
je 0x50a3d9
mov eax, dword [esp + 0x7c]
mov ebx, dword [esp + 0x68]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
cmp eax, 2
jl 0x50a908
mov ecx, eax
shr ecx, 1
mov dword [esp + 0x3c], ecx
neg ecx
lea eax, [eax + ecx*2]
mov dword [esp + 0x34], eax
mov ax, word [ebx]
mov word [esp + 0xc], ax
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0xc]
shr ecx, 2
shr eax, 7
movzx edi, cl
mov cl, byte [esp + 0xc]
movzx eax, al
shr edx, 0xc
and edx, esi
or edx, eax
shl cl, 3
and eax, esi
or eax, edi
movzx ecx, cl
and edi, esi
or ecx, edi
push edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
call fcn.004665ce
mov ecx, dword [esp + 0x20]
mov byte [ecx], al
mov ax, word [ebx + 2]
mov word [esp + 0xc], ax
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0xc]
shr ecx, 2
shr eax, 7
movzx edi, cl
mov cl, byte [esp + 0xc]
movzx eax, al
shr edx, 0xc
and edx, esi
or edx, eax
add dword [esp + 0x18], edx
shl cl, 3
and eax, esi
or eax, edi
add dword [esp + 0x10], eax
movzx ecx, cl
and edi, esi
or ecx, edi
add dword [esp + 0x14], ecx
push edx
call fcn.004665ce
mov ecx, dword [esp + 0x20]
push dword [esp + 0x14]
mov edx, dword [esp + 0x14]
push dword [esp + 0x1c]
mov byte [ecx + 1], al
xor ecx, ecx
inc ecx
call fcn.004665f0
mov ecx, dword [esp + 0x2c]
push dword [esp + 0x10]
mov edx, dword [esp + 0x18]
push dword [esp + 0x1c]
mov byte [ecx], al
xor ecx, ecx
inc ecx
call fcn.00466627
mov ecx, dword [esp + 0x28]
inc dword [esp + 0x2c]
inc dword [esp + 0x28]
add dword [esp + 0x20], 2
add ebx, 4
dec dword [esp + 0x3c]
mov byte [ecx], al
jne 0x50a812
mov eax, dword [esp + 0x34]
test eax, eax
je 0x50a97e
mov ax, word [ebx]
mov word [esp + 0xc], ax
mov eax, dword [esp + 0xc]
mov edi, dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
mov dl, byte [esp + 0xc]
shr eax, 7
movzx eax, al
shr ecx, 2
shr edi, 0xc
movzx ecx, cl
and edi, esi
or edi, eax
shl dl, 3
and eax, esi
or eax, ecx
movzx ebx, dl
and ecx, esi
or ebx, ecx
push edi
mov ecx, ebx
mov dword [esp + 0x34], eax
call fcn.004665ce
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x30]
push ebx
mov byte [ecx], al
push edi
xor ecx, ecx
call fcn.004665f0
mov ecx, dword [esp + 0x2c]
push dword [esp + 0x30]
mov byte [ecx], al
push edi
xor ecx, ecx
mov edx, ebx
call fcn.00466627
mov ecx, dword [esp + 0x28]
mov byte [ecx], al
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8