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

Disassembly:
sub esp, 0x8c
mov eax, dword [0x8870bc]
xor eax, esp
mov dword [esp + 0x88], eax
mov edx, dword [esp + 0x9c]
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], 0
push ebx
mov ebx, dword [esp + 0x98]
mov dword [esp + 8], ebx
push ebp
push esi
mov esi, dword [esp + 0x9c]
mov dword [esp + 0x14], esi
push edi
test edx, edx
je 0x50c710
lea eax, [edx - 1]
mov dword [esp + 0x3c], 0
cmp eax, 2
jbe 0x50c718
mov ebp, 3
jmp 0x50c71d
mov dword [esp + 0x3c], 1
mov ebp, 0xb
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x70], 1
mov dword [esp + 0x7c], 1
lea edi, [eax*4]
cmp ebp, 3
je 0x50c759
mov dword [esp + 0x74], 3
mov dword [esp + 0x80], 3
jmp 0x50c76c
mov dword [esp + 0x80], 5
mov dword [esp + 0x74], 2
mov esi, dword [esi]
xor ecx, ecx
mov dword [esp + 0x84], 4
mov dword [esp + 0x78], 0xc
mov dword [esp + 0x58], 0xffffffff
mov dword [esp + 0x5c], 0xffffffff
mov dword [esp + 0x60], 0xffffffff
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x88], ecx
mov dword [esp + 0x54], esi
cmp edx, 2
je 0x50c7ff
cmp edx, 3
je 0x50c7ff
mov esi, dword [esp + 0x18]
cmp dword [esp + 0x3c], ecx
jne 0x50c7dc
push dword [esi + 0x30]
lea eax, [esp + 0x58]
push 0xd
push edi
push ebp
push eax
call fcn.0050d2f0
add esp, 0x14
cmp dword [esp + 0xac], 4
jne 0x50c7f0
push edi
push ebp
push dword [esi + 0x30]
lea eax, [esp + 0x60]
push 0xd
push eax
call fcn.0050d2f0
add esp, 0x14
mov ecx, dword [esp + 0x88]
mov esi, dword [esp + 0x54]
mov dword [esp + 0x1c], ecx
add edi, 4
cmp ebx, dword [esp + 0xa8]
jae 0x50d123
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x20], eax
movzx ecx, word [ebx]
xor eax, eax
mov edx, dword [esp + 0x40]
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], eax
lea eax, [ecx - 3]
cmp eax, 0x9e
ja case.0x50c841.4
movzx eax, byte [eax + 0x50d1ec]
jmp dword [eax*4 + 0x50d1a8]
cmp dword [esp + 0xb8], 0
je 0x50c874
cmp dword [esp + 0x44], 0
jne 0x50c874
mov eax, dword [esp + 0x18]
mov dword [esp + 0x34], 1
mov dword [esp + 0x44], 1
mov eax, dword [eax + 0x24]
mov dword [esp + 0x4c], eax
add ebx, 2
mov dword [esp + 0x14], ebx
jmp 0x50cdd8
cmp dword [esp + 0xb8], 0
mov ecx, dword [esp + 0x18]
je 0x50c8d4
cmp dword [ecx + 0x6c], 0
je 0x50c8b1
cmp dword [esp + 0x44], 0
jne 0x50c8b1
mov eax, dword [ecx + 0x24]
mov edx, 1
mov dword [esp + 0x4c], eax
mov dword [esp + 0x34], edx
mov dword [esp + 0x44], edx
jmp 0x50c8b5
mov edx, dword [esp + 0x34]
mov eax, dword [ecx + 0x40]
test eax, eax
je 0x50c8d4
cmp dword [esp + 0x48], 0
jne 0x50c8d4
mov dword [esp + edx*4 + 0x4c], eax
inc edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x48], 1
mov eax, dword [ecx + 0x48]
test eax, eax
je 0x50c8f9
cmp dword [esp + 0x38], 0
jne 0x50c8f9
mov dword [esp + 0x8c], eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x38], 1
add ebx, 4
mov dword [esp + 0x14], ebx
jmp 0x50cdd8
mov eax, dword [esp + 0x18]
mov ecx, ebx
sub ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
mov eax, ecx
sar eax, 1
mov ebx, dword [edx + eax*4]
test ebx, ebx
je 0x50c94a
mov eax, 1
mov dword [esp + 0x10], eax
mov eax, ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
lea eax, [ecx + 2]
sar eax, 1
mov eax, dword [edx + eax*4]
lea ebx, [ebx + eax*2]
add ebx, 4
mov dword [esp + 0x14], ebx
jmp 0x50cdd8
mov ebx, dword [esp + 0x14]
add ebx, 4
mov dword [esp + 0x14], ebx
jmp 0x50cdd8
mov eax, 1
mov ecx, ebx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
sub ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
sar ecx, 1
add ebx, 4
mov dword [esp + 0x14], ebx
mov eax, dword [eax + ecx*4]
mov ecx, 1
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
jmp 0x50cddc
mov edx, dword [esp + 0x18]
movzx ecx, word [ebx + 4]
mov dword [esp + 0x24], 2
mov eax, dword [edx + 0x24]
lea eax, [eax + ecx*8]
mov dword [esp + 0x8c], eax
add eax, 4
mov dword [esp + 0x90], eax
mov eax, dword [edx + 0x48]
test eax, eax
je 0x50c9d9
cmp dword [esp + 0x38], 0
jne 0x50c9d9
mov dword [esp + 0x94], eax
mov dword [esp + 0x24], 3
mov dword [esp + 0x38], 1
mov eax, dword [edx + 0x14]
cmp byte [ecx + eax], 0
jne 0x50c9f9
mov eax, 1
mov dword [esp + 0x10], eax
mov eax, dword [edx + 0x20]
lea eax, [eax + ecx*4]
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
add ebx, 6
mov dword [esp + 0x14], ebx
jmp 0x50cdd8
mov ecx, dword [esp + 0x18]
movzx edx, word [ebx + 4]
mov dword [esp + 0x24], 2
mov eax, dword [ecx + 0x24]
lea eax, [eax + edx*8]
mov dword [esp + 0x8c], eax
add eax, 4
mov dword [esp + 0x90], eax
mov eax, dword [ecx + 0x48]
test eax, eax
je 0x50ca51
cmp dword [esp + 0x38], 0
jne 0x50ca51
mov dword [esp + 0x94], eax
mov dword [esp + 0x24], 3
mov dword [esp + 0x38], 1
mov eax, 2
mov ecx, ebx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
sub ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
sar ecx, 1
add ebx, 6
mov dword [esp + 0x14], ebx
mov eax, dword [eax + ecx*4]
mov ecx, 2
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0x20]
lea eax, [eax + edx*4]
mov dword [esp + 0x30], eax
jmp 0x50cddc
movzx eax, word [ebx + 2]
movzx eax, word [ebx + eax*2]
cmp eax, 0x7a
je 0x50caa4
cmp eax, 0x7b
jne 0x50cac6
mov eax, 1
mov ecx, ebx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
sub ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
sar ecx, 1
mov eax, dword [eax + ecx*4]
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
add ebx, 4
mov dword [esp + 0x14], ebx
jmp 0x50cdd8
mov edx, dword [esp + 0x18]
mov ecx, ebx
sub ecx, dword [edx + 8]
mov eax, dword [edx + 0xc]
sar ecx, 1
mov eax, dword [eax + ecx*4]
test eax, eax
mov ecx, dword [esp + 0x20]
cmovne ecx, eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x2c], ecx
xor ecx, ecx
test eax, eax
setne cl
mov dword [esp + 0x10], ecx
add ebx, 4
cmp dword [edx + 0x11c], 0
mov dword [esp + 0x14], ebx
je 0x50cddc
mov ax, word [ebx - 2]
mov edx, 0xfc00
and ax, dx
mov edx, 0xd800
cmp ax, dx
jne 0x50cddc
add ebx, 2
mov dword [esp + 0x14], ebx
jmp 0x50cddc
mov edx, dword [esp + 0x18]
mov ecx, ebx
sub ecx, dword [edx + 8]
mov eax, dword [edx + 0xc]
sar ecx, 1
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x50cb6a
mov ebp, eax
mov ecx, 2
add eax, 4
mov dword [esp + 0x20], ebp
mov dword [esp + 0x2c], ebp
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x30], eax
jmp 0x50cafb
mov ecx, dword [esp + 0x10]
jmp 0x50caff
mov edx, dword [esp + 0x18]
mov ecx, ebx
sub ecx, dword [edx + 8]
mov eax, dword [edx + 0xc]
sar ecx, 1
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x50cbab
mov ebp, eax
mov ecx, 2
add eax, 4
mov dword [esp + 0x20], ebp
mov dword [esp + 0x2c], ebp
add ebx, 6
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x30], eax
jmp 0x50cb02
mov ecx, dword [esp + 0x10]
add ebx, 6
jmp 0x50cb02
mov eax, dword [esp + 0x18]
mov ecx, ebx
sub ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
sar ecx, 1
mov eax, dword [eax + ecx*4]
test eax, eax
mov ecx, dword [esp + 0x20]
cmovne ecx, eax
add ebx, 2
mov dword [esp + 0x20], ecx
mov dword [esp + 0x2c], ecx
xor ecx, ecx
test eax, eax
mov dword [esp + 0x14], ebx
setne cl
mov dword [esp + 0x10], ecx
jmp 0x50cddc
mov eax, dword [esp + 0x18]
mov ecx, ebx
sub ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
sar ecx, 1
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x50cc2a
mov edx, eax
mov ecx, 2
add eax, 4
mov dword [esp + 0x10], ecx
add ebx, ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x14], ebx
jmp 0x50cddc
mov ecx, dword [esp + 0x10]
add ebx, 2
mov dword [esp + 0x14], ebx
jmp 0x50cddc
mov eax, dword [esp + 0x18]
mov ecx, ebx
sub ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
sar ecx, 1
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x50cc75
mov edx, eax
mov ecx, 2
add eax, 4
mov dword [esp + 0x10], ecx
add ebx, 4
mov dword [esp + 0x20], edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x14], ebx
jmp 0x50cddc
mov ecx, dword [esp + 0x10]
add ebx, 4
mov dword [esp + 0x14], ebx
jmp 0x50cddc
cmp ecx, 0x70
jne 0x50cc90
movzx ebp, word [ebx + 2]
jmp 0x50cc95
mov ebp, 0x11
mov eax, dword [esp + 0x18]
mov ecx, ebx
sub ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
sar ecx, 1
mov ebx, dword [eax + ecx*4]
test ebx, ebx
je 0x50cd19
mov eax, dword [esp + 0x14]
lea eax, [eax + ebp*2]
push eax
call fcn.00513e90
add esp, 4
sub eax, 1
je 0x50ccf2
sub eax, 1
jne 0x50cd19
mov eax, ebx
mov ecx, 2
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
lea eax, [ebx + 4]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x10], ecx
lea eax, [eax + ebp*2]
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x14], eax
jmp 0x50cddc
mov eax, ebx
mov ecx, 1
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x10], ecx
lea eax, [eax + ebp*2]
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x14], eax
jmp 0x50cddc
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
lea eax, [eax + ebp*2]
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x14], eax
jmp 0x50cddc
cmp dword [esp + 0xb8], 0
je 0x50cd5d
cmp dword [esp + 0x48], 0
jne 0x50cd5d
mov eax, dword [esp + 0x18]
mov dword [esp + 0x34], 1
mov dword [esp + 0x48], 1
mov eax, dword [eax + 0x40]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0x44]
test eax, eax
je 0x50cd86
cmp dword [esp + 0x40], 0
jne 0x50cd86
mov dword [esp + 0x8c], eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x40], 1
movzx eax, word [ebx + 2]
lea ebx, [ebx + eax*2]
add ebx, 6
mov dword [esp + 0x14], ebx
jmp 0x50cdd8
cmp dword [esp + 0x40], 0
jne 0x50cdb3
mov eax, dword [esp + 0x18]
mov dword [esp + 0x40], 1
mov eax, dword [eax + 0x44]
mov dword [esp + 0x8c], eax
xor eax, eax
add ebx, 2
test edx, edx
mov dword [esp + 0x14], ebx
sete al
mov dword [esp + 0x24], eax
jmp 0x50cdd8
push ebx
push dword [esp + 0x1c]
call fcn.005174b0
add esp, 8
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xac]
cmp edx, 2
je 0x50ce52
cmp edx, 3
je 0x50ce52
xor ebx, ebx
test ecx, ecx
jle 0x50ce55
cmp dword [esp + 0x3c], 0
jne 0x50ce1b
push dword [esp + ebx*4 + 0x2c]
lea eax, [esp + 0x58]
push 0xd
push edi
push ebp
push eax
call fcn.0050d2f0
mov edx, dword [esp + 0xc0]
add esp, 0x14
cmp edx, 4
jne 0x50ce37
push edi
push ebp
push dword [esp + ebx*4 + 0x34]
lea eax, [esp + 0x60]
push 0xd
push eax
call fcn.0050d2f0
mov edx, dword [esp + 0xc0]
add esp, 0x14
inc ebx
add edi, 4
cmp ebx, dword [esp + 0x10]
jl 0x50cdf3
mov ecx, dword [esp + 0x88]
mov esi, dword [esp + 0x54]
mov dword [esp + 0x1c], ecx
jmp 0x50ce59
lea edi, [edi + ecx*4]
mov ecx, dword [esp + 0x1c]
cmp edx, 1
je 0x50cfce
cmp edx, 3
je 0x50cfce
xor ebx, ebx
cmp dword [esp + 0x24], ebx
jle 0x50cfd5
nop word [eax + eax]
cmp dword [esp + 0x3c], 0
jne 0x50cf29
mov ebp, dword [esp + ecx*4 + 0x70]
lea eax, [esp + 0x58]
lea eax, [eax + ecx*4]
mov dword [esp + 0x10], eax
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x50ceb5
mov ecx, dword [esp + ecx*4 + 0x7c]
lea eax, [ecx - 4]
cmp eax, 5
ja 0x50cecd
push 0
push ebp
push 0
push ecx
jmp 0x50cec2
push 0
push ebp
push dword [esp + ecx*4 + 0x6c]
or eax, 0x80
push eax
push 0x20
push esi
call fcn.0051a810
add esp, 0x18
mov eax, dword [esp + 0x28]
push edi
or eax, 0x80
push eax
push 0
push ebp
push 0x20
push esi
call fcn.0051a810
mov eax, dword [esp + 0x28]
add esp, 0x18
mov ecx, dword [esp + ebx*4 + 0x8c]
mov dword [eax], 0xd
mov eax, dword [esp + 0x1c]
mov dword [esp + eax*4 + 0x64], ecx
inc eax
mov ecx, 3
cdq
idiv ecx
mov ecx, edx
mov edx, dword [esp + 0xac]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x88], ecx
cmp edx, 4
jne 0x50cfb6
mov esi, dword [esp + 0x54]
mov ebp, dword [esp + ecx*4 + 0x70]
lea eax, [esp + 0x58]
lea eax, [eax + ecx*4]
mov dword [esp + 0x10], eax
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x50cf53
mov ecx, dword [esp + ecx*4 + 0x7c]
lea eax, [ecx - 4]
cmp eax, 5
ja 0x50cf6b
push 0
push ebp
push 0
push ecx
jmp 0x50cf60
push 0
push ebp
push dword [esp + ecx*4 + 0x6c]
or eax, 0x80
push eax
push 0x20
push esi
call fcn.0051a810
add esp, 0x18
push dword [esp + ebx*4 + 0x8c]
push 0x8d
push 0
push ebp
push 0x20
push esi
call fcn.0051a810
mov eax, dword [esp + 0x28]
mov ecx, 3
mov ebp, dword [esp + 0x40]
add esp, 0x18
mov dword [eax], ebp
mov eax, dword [esp + 0x1c]
mov dword [esp + eax*4 + 0x64], edi
inc eax
cdq
idiv ecx
mov ecx, edx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0xac]
mov dword [esp + 0x88], ecx
jmp 0x50cfba
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0x54]
inc ebx
add edi, 4
cmp ebx, dword [esp + 0x24]
jl 0x50ce80
jmp 0x50cfd5
mov eax, dword [esp + 0x24]
lea edi, [edi + eax*4]
cmp edx, 1
je 0x50d10b
cmp edx, 4
je 0x50d10b
xor ebx, ebx
cmp dword [esp + 0x34], ebx
jle 0x50d112
cmp dword [esp + 0x3c], 0
lea eax, [esp + 0x58]
mov ebp, dword [esp + ecx*4 + 0x70]
lea eax, [eax + ecx*4]
jne 0x50d080
mov dword [esp + 0x24], eax
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x50d024
mov ecx, dword [esp + ecx*4 + 0x7c]
lea eax, [ecx - 4]
cmp eax, 5
ja 0x50d03c
push 0
push ebp
push 0
push ecx
jmp 0x50d031
push 0
push ebp
push dword [esp + ecx*4 + 0x6c]
or eax, 0x80
push eax
push 0x20
push esi
call fcn.0051a810
add esp, 0x18
mov eax, dword [esp + 0x28]
push edi
or eax, 0x80
push eax
push 0
push ebp
push 0x20
push esi
call fcn.0051a810
mov eax, dword [esp + 0x3c]
add esp, 0x18
mov ecx, dword [esp + ebx*4 + 0x4c]
mov ebp, dword [esp + 0x28]
mov dword [eax], 0xd
mov eax, dword [esp + 0x1c]
mov dword [esp + eax*4 + 0x64], ecx
inc eax
mov ecx, 3
cdq
idiv ecx
mov ecx, edx
mov dword [esp + 0x1c], ecx
jmp 0x50d0f0
mov dword [esp + 0x24], eax
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x50d09f
mov ecx, dword [esp + ecx*4 + 0x7c]
lea eax, [ecx - 4]
cmp eax, 5
ja 0x50d0b7
push 0
push ebp
push 0
push ecx
jmp 0x50d0ac
push 0
push ebp
push dword [esp + ecx*4 + 0x6c]
or eax, 0x80
push eax
push 0x20
push esi
call fcn.0051a810
add esp, 0x18
mov ecx, dword [esp + ebx*4 + 0x4c]
push ecx
push 0x8d
push 0
push ebp
push 0x20
push esi
call fcn.0051a810
mov eax, dword [esp + 0x3c]
mov ecx, 3
mov ebp, dword [esp + 0x40]
add esp, 0x18
mov dword [eax], ebp
mov eax, dword [esp + 0x1c]
mov dword [esp + eax*4 + 0x64], edi
inc eax
cdq
idiv ecx
mov ecx, edx
mov dword [esp + 0x1c], edx
mov esi, dword [esp + 0x54]
inc ebx
add edi, 4
mov dword [esp + 0x88], ecx
cmp ebx, dword [esp + 0x34]
jl 0x50cff3
jmp 0x50d112
mov eax, dword [esp + 0x34]
lea edi, [edi + eax*4]
mov ebx, dword [esp + 0x14]
cmp ebx, dword [esp + 0xa8]
jb 0x50c817
mov ebp, 3
nop dword [eax + eax]
mov eax, dword [esp + ecx*4 + 0x58]
cmp eax, 0xffffffff
je 0x50d176
mov edi, dword [esp + ecx*4 + 0x70]
or eax, 0x80
mov ebx, dword [esp + ecx*4 + 0x7c]
push 0
push edi
push dword [esp + ecx*4 + 0x6c]
push eax
push 0x20
push esi
call fcn.0051a810
lea eax, [ebx - 4]
add esp, 0x18
cmp eax, 5
ja 0x50d172
push 0
push ebx
push 0
push edi
push 0x20
push esi
call fcn.0051a810
add esp, 0x18
mov ecx, dword [esp + 0x1c]
lea eax, [ecx + 1]
mov ecx, 3
cdq
idiv ecx
mov ecx, edx
mov dword [esp + 0x1c], ecx
sub ebp, 1
jne 0x50d130
mov ecx, dword [esp + 0x98]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00520afb
add esp, 0x8c
ret