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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x12
push 0
push 0
dec ecx
jne 0x50b01c
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x50b6bb
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebx + 0x6c]
call fcn.00509e88
cmp byte [ebx + 0x60], 0
jne 0x50b064
mov eax, dword [ebx + 0x6c]
call fcn.0041cd1c
test eax, eax
jne 0x50b05b
mov dl, 2
mov eax, ebx
call fcn.0050c240
jmp 0x50b064
mov dl, 1
mov eax, ebx
call fcn.0050c240
mov eax, dword [ebx + 0x6c]
call fcn.0041cd1c
mov esi, eax
sub esi, 1
jno 0x50b078
call fcn.0040485c
test esi, esi
jl 0x50b14a
inc esi
xor edi, edi
mov edx, edi
mov eax, dword [ebx + 0x6c]
call fcn.00509fa0
mov edx, dword [eax + 0x10]
lea eax, [ebp - 8]
call fcn.00405924
cmp dword [ebp - 8], 0
je 0x50b142
cmp byte [ebx + 0x60], 1
jne 0x50b106
push 0
mov eax, 0x50b6d4
mov dword [ebp - 0x28], eax
mov eax, 0x50b6e4
mov dword [ebp - 0x24], eax
mov eax, 0x50b6f4
mov dword [ebp - 0x20], eax
mov eax, 0x50b704
mov dword [ebp - 0x1c], eax
mov eax, 0x50b714
mov dword [ebp - 0x18], eax
mov eax, 0x50b730
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x28]
mov ecx, 5
mov eax, dword [ebp - 8]
call fcn.0047a3c4
inc eax
jne 0x50b142
mov edx, edi
mov eax, dword [ebx + 0x6c]
call fcn.00509fa0
add eax, 0x10
mov edx, 0x50b704
call fcn.004058e0
jmp 0x50b142
push 0
mov eax, 0x50b744
mov dword [ebp - 0x30], eax
mov eax, 0x50b750
mov dword [ebp - 0x2c], eax
lea edx, [ebp - 0x30]
mov ecx, 1
mov eax, dword [ebp - 8]
call fcn.0047a3c4
inc eax
jne 0x50b142
mov edx, edi
mov eax, dword [ebx + 0x6c]
call fcn.00509fa0
add eax, 0x10
mov edx, 0x50b744
call fcn.004058e0
inc edi
dec esi
jne 0x50b083
mov eax, dword [ebx + 0x6c]
call fcn.0041cd1c
test eax, eax
jle 0x50b191
cmp dword [ebx + 0x48], 0
je 0x50b191
push 0
mov eax, 0x50b6d4
mov dword [ebp - 0x3c], eax
mov eax, 0x50b6e4
mov dword [ebp - 0x38], eax
mov eax, 0x50b6f4
mov dword [ebp - 0x34], eax
lea edx, [ebp - 0x3c]
mov ecx, 2
mov eax, dword [ebx + 0x48]
call fcn.0047a3c4
inc eax
jne 0x50b191
lea eax, [ebx + 0x48]
call fcn.0040588c
cmp byte [ebx + 0x60], 1
jne 0x50b226
mov eax, dword [ebx + 0x70]
call fcn.0050a964
lea edx, [ebp - 0xc]
mov eax, dword [0x507544]
call fcn.00507720
or ecx, 0xffffffff
mov edx, dword [ebp - 0xc]
mov eax, dword [ebx + 0x70]
call fcn.0050ac04
mov eax, dword [ebx + 0x44]
call fcn.00405b5c
test eax, eax
jne 0x50b219
mov eax, dword [ebx + 0x6c]
cmp dword [eax + 0x2c], 1
jle 0x50b1f7
cmp dword [eax + 0x20], 0
jle 0x50b1e8
lea eax, [ebx + 0x44]
mov edx, 0x50b75c
call fcn.004058e0
jmp 0x50b219
lea eax, [ebx + 0x44]
mov edx, 0x50b774
call fcn.004058e0
jmp 0x50b219
cmp dword [eax + 0x20], 0
jle 0x50b20c
lea eax, [ebx + 0x44]
mov edx, 0x50b75c
call fcn.004058e0
jmp 0x50b219
lea eax, [ebx + 0x44]
mov edx, 0x50b794
call fcn.004058e0
mov eax, dword [ebx + 0x6c]
mov eax, dword [eax + 0x24]
mov edx, ebx
mov ecx, dword [eax]
call dword [ecx + 4]
lea ecx, [ebp - 4]
lea edx, [ebp - 0xd]
mov eax, ebx
call fcn.0050c298
mov edx, dword [ebx + 0x68]
mov eax, dword [ebx + 0xc0]
mov ecx, dword [eax]
call dword [ecx + 8]
cmp byte [ebx + 0x60], 1
jne 0x50b25d
mov eax, dword [ebx + 0x6c]
call fcn.0041cd1c
dec eax
jne 0x50b25d
mov eax, ebx
call fcn.0050af60
test al, al
jne 0x50b261
xor eax, eax
jmp 0x50b263
mov al, 1
mov byte [ebx + 0xc6], al
mov esi, dword [ebx + 0xc0]
push 1
push 0
push 0
lea eax, [ebp - 0x40]
push eax
mov ecx, dword [ebp - 4]
movzx edx, byte [ebp - 0xd]
mov eax, dword [ebx + 0x64]
call fcn.00501368
mov ecx, dword [ebp - 0x40]
mov edx, 0x50b7a8
mov eax, esi
call fcn.004fe3e0
mov eax, dword [ebp - 4]
push eax
push 0
push 0
lea eax, [ebp - 0x44]
push eax
movzx ecx, byte [ebp - 0xd]
xor edx, edx
mov eax, dword [ebx + 0x90]
call fcn.00501ae4
mov ecx, dword [ebp - 0x44]
mov edx, 0x50b7b8
mov eax, esi
call fcn.004fe3e0
push 0
push 0
push 0
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp - 4]
movzx edx, byte [ebp - 0xd]
mov eax, dword [ebx + 0x98]
call fcn.00501368
mov ecx, dword [ebp - 0x48]
mov edx, 0x50b7c8
mov eax, esi
call fcn.004fe3e0
push 0
push 0
push 0
lea eax, [ebp - 0x4c]
push eax
mov ecx, dword [ebp - 4]
movzx edx, byte [ebp - 0xd]
mov eax, dword [ebx + 0x40]
call fcn.00501368
mov ecx, dword [ebp - 0x4c]
mov edx, 0x50b7d4
mov eax, esi
call fcn.004fe3e0
cmp byte [ebx + 0xc5], 0
jne 0x50b32f
xor ecx, ecx
mov edx, 0x50b7e0
mov eax, esi
call fcn.004fe3e0
jmp 0x50b357
push 0
push 0
push 0
lea eax, [ebp - 0x50]
push eax
mov ecx, dword [ebp - 4]
movzx edx, byte [ebp - 0xd]
mov eax, dword [ebx + 0x34]
call fcn.00501368
mov ecx, dword [ebp - 0x50]
mov edx, 0x50b7e0
mov eax, esi
call fcn.004fe3e0
lea edx, [ebp - 0x54]
mov eax, dword [ebx + 0x78]
call fcn.0041d5f4
mov ecx, dword [ebp - 0x54]
mov edx, 0x50b7ec
mov eax, esi
call fcn.004fe3e0
cmp byte [ebx + 0x60], 1
jne 0x50b48c
cmp byte [ebx + 0xc6], 0
je 0x50b3c4
mov ecx, 0x50b800
mov edx, 0x50b80c
mov eax, esi
call fcn.004fe3e0
xor ecx, ecx
mov edx, 0x50b824
mov eax, esi
call fcn.004fe3e0
xor ecx, ecx
mov edx, 0x50b83c
mov eax, esi
call fcn.004fe3e0
xor ecx, ecx
mov edx, 0x50b860
mov eax, esi
call fcn.004fe3e0
jmp 0x50b4aa
mov ecx, dword [ebx + 0x44]
mov edx, 0x50b824
mov eax, esi
call fcn.004fe3e0
cmp dword [ebx + 0x3c], 0
jbe 0x50b423
lea ecx, [ebp - 0x5c]
mov edx, 0x50b824
mov eax, esi
call fcn.004fe1cc
push dword [ebp - 0x5c]
push 0x50b87c
push 0x50b888
push 0x50b894
push 0x50b8a0
push dword [ebx + 0x3c]
push 0x50b8b4
lea eax, [ebp - 0x58]
mov edx, 7
call fcn.00405c20
mov ecx, dword [ebp - 0x58]
mov edx, 0x50b824
mov eax, esi
call fcn.004fe3e0
mov eax, dword [ebx + 0x6c]
call fcn.0041cd1c
test eax, eax
jle 0x50b46a
lea ecx, [ebp - 0x64]
mov edx, 0x50b824
mov eax, esi
call fcn.004fe1cc
push dword [ebp - 0x64]
push 0x50b8c0
push dword [ebp - 0xc]
push 0x50b8b4
lea eax, [ebp - 0x60]
mov edx, 4
call fcn.00405c20
mov ecx, dword [ebp - 0x60]
mov edx, 0x50b824
mov eax, esi
call fcn.004fe3e0
mov ecx, 0x50b800
mov edx, 0x50b80c
mov eax, esi
call fcn.004fe3e0
mov ecx, dword [ebx + 0x48]
mov edx, 0x50b83c
mov eax, esi
call fcn.004fe3e0
jmp 0x50b4aa
mov ecx, dword [ebx + 0x48]
mov edx, 0x50b83c
mov eax, esi
call fcn.004fe3e0
mov ecx, dword [ebx + 0x44]
mov edx, 0x50b824
mov eax, esi
call fcn.004fe3e0
lea edx, [ebp - 0x68]
mov eax, dword [ebx + 0xa8]
call fcn.004fecb8
mov ecx, dword [ebp - 0x68]
mov edx, 0x50b8d8
mov eax, esi
call fcn.004fe3e0
push 0
push 0
push 0
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp - 4]
movzx edx, byte [ebp - 0xd]
mov eax, dword [ebx + 0xa4]
call fcn.00501368
mov ecx, dword [ebp - 0x6c]
mov edx, 0x50b8e8
mov eax, esi
call fcn.004fe3e0
mov eax, dword [ebp - 4]
push eax
push 0
push 0
lea eax, [ebp - 0x70]
push eax
movzx ecx, byte [ebp - 0xd]
xor edx, edx
mov eax, dword [ebx + 0x88]
call fcn.00501ae4
mov ecx, dword [ebp - 0x70]
mov edx, 0x50b8fc
mov eax, esi
call fcn.004fe3e0
push 0
push 0
push 0
lea eax, [ebp - 0x74]
push eax
mov ecx, dword [ebp - 4]
movzx edx, byte [ebp - 0xd]
mov eax, dword [ebx + 0x94]
call fcn.005009cc
mov ecx, dword [ebp - 0x74]
mov edx, 0x50b914
mov eax, esi
call fcn.004fe3e0
mov ecx, dword [ebx + 0x9c]
mov edx, 0x50b938
mov eax, esi
call fcn.004fe3e0
mov eax, ebx
call fcn.0050c1d8
test al, al
je 0x50b58d
call fcn.0040cfbc
add esp, 0xfffffff8
fstp qword [esp]
wait
lea edx, [ebp - 0x78]
xor eax, eax
call fcn.0047bfdc
mov ecx, dword [ebp - 0x78]
mov edx, 0x50b94c
mov eax, esi
call fcn.004fe3e0
jmp 0x50b5ac
push dword [ebx + 0x54]
push dword [ebx + 0x50]
lea edx, [ebp - 0x7c]
xor eax, eax
call fcn.0047bfdc
mov ecx, dword [ebp - 0x7c]
mov edx, 0x50b94c
mov eax, esi
call fcn.004fe3e0
cmp byte [ebx + 0x8c], 2
je 0x50b5df
lea edx, [ebp - 0x80]
movzx eax, byte [ebx + 0x8c]
add eax, 1
jno 0x50b5c9
call fcn.0040485c
call fcn.0040a724
mov ecx, dword [ebp - 0x80]
mov edx, 0x50b95c
mov eax, esi
call fcn.004fe3e0
jmp 0x50b604
mov edx, 0x50b95c
mov eax, esi
call fcn.004fe350
test eax, eax
jl 0x50b604
mov edx, 0x50b95c
mov eax, esi
call fcn.004fe350
mov edx, eax
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x48]
mov eax, dword [ebx + 0x5c]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x50b61a
mov edx, dword [ebx + 0x5c]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x40]
lea edx, [ebp - 0x84]
mov eax, ebx
call fcn.0050c338
cmp dword [ebp - 0x84], 0
jne 0x50b671
lea ecx, [ebp - 0x88]
mov edx, 0x50b970
mov eax, esi
call fcn.004fe1cc
cmp dword [ebp - 0x88], 0
je 0x50b690
lea ecx, [ebp - 0x8c]
mov edx, 0x50b970
mov eax, esi
call fcn.004fe1cc
mov ecx, dword [ebp - 0x8c]
mov edx, 0x50b984
mov eax, esi
call fcn.004fe3e0
jmp 0x50b690
lea edx, [ebp - 0x90]
mov eax, ebx
call fcn.0050c338
mov ecx, dword [ebp - 0x90]
mov edx, 0x50b984
mov eax, esi
call fcn.004fe3e0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50b6c2
lea eax, [ebp - 0x90]
mov edx, 0x15
call fcn.004058b0
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004058b0
ret