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

Disassembly:
push ebx
push edi
push esi
sub esp, 0xf4
mov ecx, dword [esp + 0x10c]
mov dword [esp + 0x24], ecx
mov eax, dword [esp + 0x108]
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x104]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], eax
mov dword [esp + 0xb0], edx
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], ecx
mov dword [esp + 0xbc], 1
mov dword [esp + 0xc0], 1
mov dword [esp + 0xc4], 1
mov dword [esp + 0xc8], 0
mov dword [esp + 0xcc], 0
mov dword [esp + 0xd0], 0
mov dword [esp + 0xd4], eax
cmp eax, 2
jb 0x50fb49
mov eax, dword [esp + 0x28]
mov dword [esp + 0x60], 2
mov dword [esp], 1
mov dword [esp + 4], eax
call fcn.004e93c0
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
mov dword [esp + 0xd8], ecx
mov edx, ecx
add edx, 0x18
mov dword [esp + 0x64], edx
mov dword [esp + 0x80], ecx
mov dword [esp + 0x84], eax
xor ecx, ecx
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.004e93c0
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x80]
mov dword [esp + 0xdc], eax
mov ecx, dword [esp + 0x64]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.0040db80
mov byte [esp + 0x23], al
mov cl, al
and cl, 1
mov byte [esp + 0xe3], cl
test al, 1
jne 0x50fb67
jmp 0x50fb5b
mov eax, dword [esp + 0x28]
mov dword [esp + 0x58], eax
mov byte [esp + 0x5c], 0
jmp 0x50fd48
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x60], eax
jb 0x50fb7f
jmp 0x50fb7a
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x60], eax
jb 0x50fc70
jmp 0x50fc6b
jmp 0x50fc40
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0xe4], ecx
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.004e93c0
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
cmp edx, eax
setb bl
and bl, 1
mov byte [esp + 0xa3], bl
mov dword [esp + 0xa4], ecx
imul edx, edx, 0x18
add edx, dword [esp + 0xa4]
mov dword [esp + 0x9c], edx
mov edx, dword [esp + 0x9c]
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0x60]
mov dword [esp + 0x7c], edx
mov edx, dword [esp + 0x7c]
sub edx, 1
mov dword [esp + 0x78], edx
mov dword [esp + 0xa8], ecx
mov dword [esp + 0xac], eax
mov ecx, dword [esp + 0x78]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.004e93c0
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0xa8]
mov dword [esp + 0xe8], eax
imul ecx, dword [esp + 0x78], 0x18
add eax, ecx
mov ecx, dword [esp + 0x74]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.0040db80
test al, 1
jne 0x50fc52
jmp 0x50fc42
jmp 0x50fc54
mov eax, dword [esp + 0x60]
add eax, 1
mov dword [esp + 0x60], eax
jmp 0x50fb5b
jmp 0x50fc40
mov al, byte [esp + 0x23]
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x58], ecx
and al, 1
mov byte [esp + 0x5c], al
jmp 0x50fd48
jmp 0x50fd31
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x18], ecx
mov dword [esp + 0xec], ecx
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.004e93c0
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
cmp edx, eax
setb bl
and bl, 1
mov byte [esp + 0x8f], bl
mov dword [esp + 0x90], ecx
imul edx, edx, 0x18
add edx, dword [esp + 0x90]
mov dword [esp + 0x88], edx
mov edx, dword [esp + 0x88]
mov dword [esp + 0x68], edx
mov edx, dword [esp + 0x60]
mov dword [esp + 0x70], edx
mov edx, dword [esp + 0x70]
sub edx, 1
mov dword [esp + 0x6c], edx
mov dword [esp + 0x94], ecx
mov dword [esp + 0x98], eax
mov ecx, dword [esp + 0x6c]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.004e93c0
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x94]
mov dword [esp + 0xf0], eax
imul ecx, dword [esp + 0x6c], 0x18
add eax, ecx
mov ecx, dword [esp + 0x68]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.0040db80
test al, 1
jne 0x50fd38
jmp 0x50fd36
jmp 0x50fc54
jmp 0x50fd31
mov eax, dword [esp + 0x60]
add eax, 1
mov dword [esp + 0x60], eax
jmp 0x50fb67
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x58]
mov dl, byte [esp + 0x5c]
mov byte [esp + 0x17], dl
mov dword [esp + 0x3c], eax
and dl, 1
mov byte [esp + 0x43], dl
cmp eax, ecx
je 0x50fd8c
mov eax, dword [esp + 0x28]
or eax, 1
mov dword [esp + 0x44], eax
mov dword [esp + 0x30], eax
mov eax, 1
xor ecx, ecx
cmp dword [esp + 0x30], 0
cmove eax, ecx
cmp eax, 0
je 0x50fd96
jmp 0x50fda3
mov al, byte [esp + 0x17]
test al, 1
jne 0x50fdfe
jmp 0x50fdfc
mov eax, esp
mov dword [eax], 0x602b90
call fcn.005f69a0
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x48], ecx
bsr ecx, ecx
xor ecx, 0x1f
mov dword [esp + 0x4c], ecx
mov ecx, 0x1f
sub ecx, dword [esp + 0x4c]
mov dword [esp + 0x50], ecx
shl ecx, 1
mov dword [esp + 0x54], ecx
xor edi, edi
mov dword [esp], esi
mov dword [esp + 4], edx
mov dword [esp + 8], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
call fcn.005109a0
add esp, 0xf4
pop esi
pop edi
pop ebx
ret
jmp 0x50fdf2
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.004221d0
jmp 0x50fdfc