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

Disassembly:
push 0xffffffffffffffff
push 0x648d7b
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
push ebx
push ebp
push edi
mov eax, dword [0x6af168]
xor eax, esp
push eax
lea eax, [esp + 0xe0]
mov dword fs:[0], eax
cmp dword [esi + 0x70], 0
lea edi, [esi + 0x70]
jne 0x50ab0b
mov eax, dword [esi]
mov edx, dword [eax + 0x68]
mov ecx, esi
call edx
cmp byte [esi + 0x52], 0
jne 0x50ab16
cmp dword [esi + 0x48], 0
mov byte [esi + 0x78], 1
je 0x50a28f
mov eax, dword [esi]
mov edx, dword [eax + 0x7c]
mov ecx, esi
call edx
push 0x7c
lea eax, [esp + 0x60]
push 0
push eax
call fcn.0062a710
mov cl, byte [esi + 0x76]
mov ebx, dword [esi + 0x6c]
mov edx, dword [esi + 0x24]
mov eax, dword [esi + 0x28]
add esp, 0xc
neg cl
mov dword [esp + 0x5c], 0x7c
mov dword [esp + 0x60], 7
mov dword [esp + 0x68], edx
mov dword [esp + 0x64], eax
sbb ecx, ecx
and ecx, 0x3800
add ebx, 0x3c
add ecx, 0x800
push ebx
mov dword [esp + 0xc8], ecx
mov dword [esp + 0x54], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push edi
lea ecx, [esp + 0x60]
mov dword [esp + 0xec], 0
push ecx
mov ecx, dword [esi + 0x6c]
call fcn.004ff710
test eax, eax
jne 0x50ab0f
mov edx, dword [esi]
mov eax, dword [edx + 0xbc]
mov ecx, esi
call eax
test al, al
je 0x50ab0f
mov eax, dword [esi + 0x6c]
mov edx, dword [eax + 0x24]
mov ecx, 8
sub ecx, dword [eax + 0x1c]
mov edi, 0x18
sub edi, dword [eax + 0x14]
mov ebp, 0x10
sub ebp, dword [eax + 0x18]
mov dword [esp + 0x3c], ecx
mov ecx, dword [eax + 0x20]
mov eax, dword [eax + 0x28]
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0xe0]
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 0xd4]
cmp eax, 0x10
mov dword [esp + 0x34], ecx
mov ecx, dword [esi + 0xd8]
mov dword [esp + 0x38], edx
mov edx, dword [esi + 0xdc]
mov dword [esp + 0x28], edi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x48], ecx
mov dword [esp + 0x40], edx
jne 0x50a6f8
mov ebx, dword [esi + 0xa4]
test ebx, ebx
mov dword [esp + 0x18], ebx
je 0x50aaf4
xor eax, eax
cmp dword [esi + 0x38], eax
mov byte [esp + 0x27], 1
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
je 0x50a48f
mov eax, dword [esi + 0x24]
imul eax, dword [esi + 0x28]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00613caa
mov ecx, eax
mov eax, dword [esi + 0x38]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x2c], ecx
mov ecx, dword [esi + 0x24]
imul ecx, dword [esi + 0x28]
add esp, 4
test ecx, ecx
mov dword [esp + 0x14], 0
jle 0x50a48b
jmp 0x50a404
mov eax, dword [esp + 0x2c]
mov edx, dword [eax]
mov ecx, dword [esp + 0x3c]
add eax, 4
mov dword [esp + 0x2c], eax
mov eax, edx
shr eax, cl
mov ecx, dword [esp + 0x44]
mov ebx, edx
shl eax, cl
mov ecx, ebp
shr ebx, cl
mov ecx, dword [esp + 0x38]
and eax, dword [esp + 0x4c]
shl ebx, cl
mov ecx, edi
and ebx, dword [esp + 0x40]
or eax, ebx
mov ebx, edx
shr ebx, cl
mov ecx, dword [esp + 0x34]
shl ebx, cl
mov ecx, dword [esp + 0x28]
and ebx, dword [esp + 0x48]
or eax, ebx
cmp byte [esp + 0x27], 0
mov word [ecx], ax
je 0x50a468
shr edx, 0x18
cmp edx, 0xff
jge 0x50a468
movzx edx, ax
mov byte [esp + 0x27], 0
mov dword [esp + 0x20], edx
mov ecx, dword [esi + 0x24]
imul ecx, dword [esi + 0x28]
mov eax, dword [esp + 0x14]
add dword [esp + 0x28], 2
add eax, 1
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x50a400
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
cmp byte [esi + 0x51], 0
je 0x50a674
mov ecx, dword [esi + 0x38]
test ecx, ecx
je 0x50a674
xor ebp, ebp
cmp byte [esi + 0x77], 0
je 0x50a4f9
cmp dword [esi + 0x28], ebp
movzx edx, word [eax]
mov dword [esp + 0x20], edx
mov ecx, ebx
mov edi, eax
jle 0x50a6bd
xor eax, eax
cmp dword [esi + 0x24], eax
jle 0x50a4db
mov dx, word [edi]
mov word [ecx], dx
add eax, 1
add ecx, 2
add edi, 2
cmp eax, dword [esi + 0x24]
jl 0x50a4c7
mov eax, dword [esi + 0x90]
cdq
sub eax, edx
sar eax, 1
sub eax, dword [esi + 0x24]
add ebp, 1
cmp ebp, dword [esi + 0x28]
lea ecx, [ecx + eax*2]
jl 0x50a4c0
jmp 0x50a6bd
mov eax, dword [esi + 0x24]
imul eax, dword [esi + 0x28]
test eax, eax
mov edx, dword [esp + 0x1c]
jle 0x50a60b
lea esp, [esp]
mov eax, dword [ecx]
movzx edi, word [edx]
and eax, 0xff000000
add ecx, 4
add edx, 2
cmp eax, 0xff000000
jne 0x50a52e
cmp word [esp + 0x20], di
je 0x50a541
mov eax, dword [esi + 0x24]
imul eax, dword [esi + 0x28]
add ebp, 1
cmp ebp, eax
jl 0x50a510
jmp 0x50a60b
push 0x2000
call fcn.00613caa
push 0x2000
mov ebx, eax
push 0
push ebx
mov dword [esp + 0x3c], ebx
call fcn.0062a710
mov ecx, dword [esi + 0x24]
imul ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x38]
mov edi, dword [esp + 0x2c]
add esp, 0x10
xor ebp, ebp
test ecx, ecx
jle 0x50a5ba
mov eax, dword [edx]
movzx ecx, word [edi]
shr eax, 0x18
add edx, 4
add edi, 2
test eax, eax
jle 0x50a5ac
movzx ecx, cx
mov eax, ecx
shr eax, 5
and ecx, 0x8000001f
lea eax, [ebx + eax*4]
jns 0x50a59f
dec ecx
or ecx, 0xffffffe0
inc ecx
mov ebx, 1
shl ebx, cl
or dword [eax], ebx
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esi + 0x24]
imul ecx, dword [esi + 0x28]
add ebp, 1
cmp ebp, ecx
jl 0x50a575
xor edx, edx
lea esp, [esp]
mov eax, dword [ebx + edx*4]
cmp eax, 0xffff
je 0x50a5f3
xor ecx, ecx
lea esp, [esp]
mov edi, 1
shl edi, cl
test eax, edi
je 0x50a5e5
add ecx, 1
cmp ecx, 0x20
jl 0x50a5d0
jmp 0x50a5f3
mov eax, edx
shl eax, 5
add eax, ecx
movzx ecx, ax
mov dword [esp + 0x20], ecx
add edx, 1
cmp edx, 0x800
jl 0x50a5c0
push ebx
call fcn.0062493b
mov ebx, dword [esp + 0x1c]
add esp, 4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x50a6bd
mov edi, dword [esp + 0x1c]
mov ecx, ebx
xor ebx, ebx
cmp dword [esi + 0x28], ebx
mov ebp, eax
jle 0x50a6bd
xor edx, edx
cmp dword [esi + 0x24], edx
jle 0x50a659
mov eax, dword [ebp]
shr eax, 0x18
add ebp, 4
cmp eax, 0xff
mov ax, word [esp + 0x20]
jl 0x50a648
mov ax, word [edi]
mov word [ecx], ax
add edx, 1
add ecx, 2
add edi, 2
cmp edx, dword [esi + 0x24]
jl 0x50a630
mov eax, dword [esi + 0x90]
cdq
sub eax, edx
sar eax, 1
sub eax, dword [esi + 0x24]
add ebx, 1
cmp ebx, dword [esi + 0x28]
lea ecx, [ecx + eax*2]
jl 0x50a629
jmp 0x50a6bd
test eax, eax
je 0x50a6bd
mov edi, dword [esp + 0x1c]
xor ebp, ebp
cmp dword [esi + 0x28], ebp
mov ecx, ebx
jle 0x50a6bd
xor eax, eax
cmp dword [esi + 0x24], eax
jle 0x50a6a4
lea esp, [esp]
mov dx, word [edi]
mov word [ecx], dx
add eax, 1
add ecx, 2
add edi, 2
cmp eax, dword [esi + 0x24]
jl 0x50a690
mov eax, dword [esi + 0x90]
cdq
sub eax, edx
sar eax, 1
sub eax, dword [esi + 0x24]
add ebp, 1
cmp ebp, dword [esi + 0x28]
lea ecx, [ecx + eax*2]
jl 0x50a685
mov eax, dword [esp + 0x1c]
push eax
call fcn.0062493b
add esp, 4
cmp byte [esi + 0x51], 0
je 0x50aaf4
movzx eax, word [esp + 0x20]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0x70]
mov ecx, dword [eax]
lea edx, [esp + 0x2c]
push edx
push 8
push eax
mov eax, dword [ecx + 0x74]
call eax
jmp 0x50aaf4
cmp eax, 0x20
jne 0x50ab0f
mov ecx, dword [esi + 0xa4]
test ecx, ecx
mov dword [esp + 0x14], ecx
je 0x50aaf4
cmp byte [esi + 0x51], 0
mov bl, 1
mov dword [esp + 0x20], 0
je 0x50aa3e
mov eax, dword [esi + 0x38]
test eax, eax
je 0x50aa3e
cmp byte [esi + 0x77], 0
je 0x50a829
mov eax, dword [eax]
mov ecx, dword [esp + 0x3c]
mov edx, eax
shr edx, cl
mov ecx, dword [esp + 0x44]
mov ebx, eax
shl edx, cl
mov ecx, ebp
shr ebx, cl
mov ecx, dword [esp + 0x38]
and edx, dword [esp + 0x4c]
shl ebx, cl
mov ecx, edi
mov edi, dword [esp + 0x14]
shr eax, cl
mov ecx, dword [esp + 0x34]
and ebx, dword [esp + 0x40]
mov dword [esp + 0x14], 0
shl eax, cl
or edx, ebx
mov ebx, dword [esi + 0x38]
and eax, dword [esp + 0x48]
or edx, eax
cmp dword [esi + 0x28], 0
mov dword [esp + 0x20], edx
jle 0x50aa1b
nop
cmp dword [esi + 0x24], 0
mov dword [esp + 0x18], 0
jle 0x50a7fb
mov edi, edi
mov eax, dword [ebx]
mov ecx, dword [esp + 0x3c]
mov edx, eax
shr edx, cl
mov ecx, dword [esp + 0x44]
add ebx, 4
add edi, 4
shl edx, cl
mov ecx, eax
mov dword [esp + 0x2c], ecx
mov ecx, ebp
and edx, dword [esp + 0x4c]
mov ebp, eax
shr ebp, cl
mov ecx, dword [esp + 0x38]
shl ebp, cl
mov ecx, dword [esp + 0x28]
shr eax, cl
mov ecx, dword [esp + 0x34]
and ebp, dword [esp + 0x40]
shl eax, cl
or edx, ebp
mov ebp, dword [esp + 0x1c]
and eax, dword [esp + 0x48]
or edx, eax
mov eax, dword [esp + 0x18]
mov dword [edi - 4], edx
add eax, 1
cmp eax, dword [esi + 0x24]
mov dword [esp + 0x18], eax
jl 0x50a7a0
mov eax, dword [esi + 0x90]
cdq
and edx, 3
add eax, edx
sar eax, 2
sub eax, dword [esi + 0x24]
lea edi, [edi + eax*4]
mov eax, dword [esp + 0x14]
add eax, 1
cmp eax, dword [esi + 0x28]
mov dword [esp + 0x14], eax
jl 0x50a790
jmp 0x50aa1b
mov edx, dword [esi + 0x24]
imul edx, dword [esi + 0x28]
test edx, edx
mov edi, eax
jle 0x50a863
mov eax, dword [esi + 0x24]
imul eax, dword [esi + 0x28]
mov dword [esp + 0x18], eax
mov ecx, dword [edi]
add edi, 4
test bl, bl
je 0x50a85c
mov eax, ecx
shr eax, 0x18
cmp eax, 0xff
jge 0x50a85c
xor bl, bl
mov dword [esp + 0x20], ecx
sub dword [esp + 0x18], 1
jne 0x50a841
mov ecx, dword [esi + 0x38]
xor edi, edi
test edx, edx
jle 0x50a952
mov edx, dword [esp + 0x20]
mov eax, dword [ecx]
mov ebx, eax
and ebx, 0xff000000
add ecx, 4
cmp ebx, 0xff000000
jne 0x50a892
and eax, 0xffffff
cmp edx, eax
je 0x50a8a5
mov eax, dword [esi + 0x24]
imul eax, dword [esi + 0x28]
add edi, 1
cmp edi, eax
jl 0x50a874
jmp 0x50a952
push 0x200000
call fcn.00613caa
push 0x200000
mov ebx, eax
push 0
push ebx
mov dword [esp + 0x3c], ebx
call fcn.0062a710
mov ecx, dword [esi + 0x24]
imul ecx, dword [esi + 0x28]
mov edi, dword [esi + 0x38]
add esp, 0x10
xor edx, edx
test ecx, ecx
jle 0x50a90e
mov ecx, dword [edi]
mov eax, ecx
shr eax, 0x18
add edi, 4
test eax, eax
jle 0x50a900
mov eax, ecx
shr eax, 5
and eax, 0x7ffff
lea eax, [ebx + eax*4]
and ecx, 0x1f
mov ebx, 1
shl ebx, cl
or dword [eax], ebx
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esi + 0x24]
imul ecx, dword [esi + 0x28]
add edx, 1
cmp edx, ecx
jl 0x50a8d5
xor edx, edx
mov eax, dword [ebx + edx*4]
cmp eax, 0xffff
je 0x50a933
xor ecx, ecx
lea esp, [esp]
mov edi, 1
shl edi, cl
test eax, edi
je 0x50a940
add ecx, 1
cmp ecx, 0x20
jl 0x50a920
add edx, 1
cmp edx, 0x80000
jl 0x50a910
jmp 0x50a949
shl edx, 5
add edx, ecx
mov dword [esp + 0x20], edx
push ebx
call fcn.0062493b
add esp, 4
mov ecx, dword [esi + 0x38]
test ecx, ecx
je 0x50aa1b
cmp dword [esi + 0x28], 0
mov edi, dword [esp + 0x14]
mov dword [esp + 0x14], 0
jle 0x50aa1b
cmp dword [esi + 0x24], 0
mov dword [esp + 0x18], 0
jle 0x50a9f2
mov eax, dword [ecx]
mov edx, eax
add ecx, 4
shr edx, 0x18
cmp edx, 0xff
mov dword [esp + 0x2c], ecx
jge 0x50a9a3
mov eax, dword [esp + 0x20]
mov dword [edi], eax
jmp 0x50a9df
mov ecx, dword [esp + 0x3c]
mov edx, eax
shr edx, cl
mov ecx, dword [esp + 0x44]
mov ebx, eax
shl edx, cl
mov ecx, ebp
shr ebx, cl
mov ecx, dword [esp + 0x38]
and edx, dword [esp + 0x4c]
shl ebx, cl
mov ecx, dword [esp + 0x28]
shr eax, cl
mov ecx, dword [esp + 0x34]
and ebx, dword [esp + 0x40]
shl eax, cl
mov ecx, dword [esp + 0x2c]
or edx, ebx
and eax, dword [esp + 0x48]
or edx, eax
mov dword [edi], edx
mov eax, dword [esp + 0x18]
add eax, 1
add edi, 4
cmp eax, dword [esi + 0x24]
mov dword [esp + 0x18], eax
jl 0x50a985
mov eax, dword [esi + 0x90]
cdq
and edx, 3
add eax, edx
sar eax, 2
sub eax, dword [esi + 0x24]
lea edi, [edi + eax*4]
mov eax, dword [esp + 0x14]
add eax, 1
cmp eax, dword [esi + 0x28]
mov dword [esp + 0x14], eax
jl 0x50a973
mov eax, dword [esp + 0x20]
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov eax, dword [esi + 0x70]
mov ecx, dword [eax]
lea edx, [esp + 0x54]
push edx
push 8
push eax
mov eax, dword [ecx + 0x74]
call eax
jmp 0x50aaf4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x50aaf4
cmp dword [esi + 0x28], 0
mov edi, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0
jle 0x50aaf4
xor edx, edx
cmp dword [esi + 0x24], edx
jle 0x50aacb
jmp 0x50aa70
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
add ecx, 4
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x3c]
mov ebx, eax
shr ebx, cl
mov ecx, dword [esp + 0x44]
add edx, 1
add edi, 4
shl ebx, cl
mov ecx, eax
mov dword [esp + 0x2c], ecx
mov ecx, ebp
and ebx, dword [esp + 0x4c]
mov ebp, eax
shr ebp, cl
mov ecx, dword [esp + 0x38]
shl ebp, cl
mov ecx, dword [esp + 0x28]
shr eax, cl
mov ecx, dword [esp + 0x34]
and ebp, dword [esp + 0x40]
shl eax, cl
or ebx, ebp
mov ebp, dword [esp + 0x1c]
and eax, dword [esp + 0x48]
or ebx, eax
mov dword [edi - 4], ebx
cmp edx, dword [esi + 0x24]
jl 0x50aa70
mov eax, dword [esi + 0x90]
cdq
and edx, 3
add eax, edx
sar eax, 2
sub eax, dword [esi + 0x24]
lea edi, [edi + eax*4]
mov eax, dword [esp + 0x14]
add eax, 1
cmp eax, dword [esi + 0x28]
mov dword [esp + 0x14], eax
jl 0x50aa61
mov edx, dword [esi]
mov eax, dword [edx + 0xc0]
mov ecx, esi
call eax
mov ecx, dword [esp + 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
jmp 0x50ab18
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
mov ecx, dword [esp + 0xe0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
add esp, 0xdc
ret