Function at 0x507be0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
push ebx
push esi
push edi
lea eax, [ebp - 0x80]
mov edi, ecx
push eax
call fcn.004bcd00
add esp, 4
mov ecx, edi
push eax
call fcn.00500bd0
cmp dword [ebp - 0x6c], 8
jb 0x507c13
push dword [ebp - 0x80]
call fcn.00412895
add esp, 4
mov ecx, edi
call fcn.005049a0
push dword [ebp + 0xc]
lea esi, [edi + 0xc4]
mov ecx, esi
call fcn.004f4de0
test al, al
jne 0x507c39
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x68]
mov dword [ebp - 8], 0
push eax
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.004f4ba0
cmp dword [ebp - 0x58], 0
je 0x507c87
lea eax, [ebp - 0x68]
push eax
push dword [ebp + 8]
lea ecx, [edi + 0x78]
call fcn.0051a7f0
lea ecx, [edi + 0x78]
call fcn.0051a9a0
mov ecx, edi
call fcn.00509780
mov dword [edi + 0x484], 0
xor esi, esi
jmp 0x507f3c
lea eax, [ebp - 4]
mov ecx, esi
push eax
lea eax, [ebp - 8]
push eax
call fcn.004f24b0
push 1
test al, al
lea ebx, [edi + 0x78]
push 4
lea eax, [ebp - 0x80]
push eax
je 0x507cbd
call fcn.004bc8f0
add esp, 0xc
mov ecx, ebx
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0051a730
jmp 0x507cd0
call fcn.004bc8f0
add esp, 0xc
mov ecx, ebx
push eax
push dword [ebp + 8]
call fcn.0051a7f0
lea ecx, [ebp - 0x80]
call fcn.0040329c
xor eax, eax
mov dword [ebp - 0xc], 7
mov word [ebp - 0x20], ax
mov ecx, esi
lea eax, [ebp - 0x20]
mov dword [ebp - 0x10], 0
push eax
call fcn.004f46d0
test eax, eax
je 0x507d07
lea eax, [ebp - 0x20]
push eax
call fcn.004bca30
add esp, 4
push 0x502d90
mov ecx, ebx
call fcn.0051a8f0
mov ecx, edi
call fcn.00503bb0
dec eax
mov ecx, ebx
neg eax
sbb eax, eax
inc eax
setne al
movzx eax, al
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.0051a3a0
push eax
mov ecx, esi
call fcn.004f4ca0
cmp dword [ebp - 0x6c], 0x10
jb 0x507d4b
push dword [ebp - 0x80]
call fcn.00412895
add esp, 4
sub esp, 0x18
mov ecx, esi
push esp
call fcn.004f2530
call fcn.004f9f40
mov ecx, eax
call fcn.004fa460
push 0
push 0
mov ecx, esi
call fcn.004f4b80
push eax
call fcn.004c61b0
add esp, 0xc
lea ecx, [ebp - 0x80]
push 0x594314
call fcn.00408738
push dword [ebp + 0xc]
lea ecx, [ebp - 0x38]
call fcn.00408738
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.004b2e00
add esp, 4
push eax
call fcn.004c3ac0
push eax
mov ecx, edi
call fcn.00503bb0
push eax
mov ecx, esi
call fcn.004f5680
movzx eax, al
mov ecx, edi
push eax
push 0x7d0
call fcn.00502870
cmp dword [ebp - 0x3c], 8
jb 0x507dd9
push dword [ebp - 0x50]
call fcn.00412895
add esp, 4
xor eax, eax
mov dword [ebp - 0x3c], 7
cmp dword [ebp - 0x24], 8
mov dword [ebp - 0x40], 0
mov word [ebp - 0x50], ax
jb 0x507dfe
push dword [ebp - 0x38]
call fcn.00412895
add esp, 4
xor eax, eax
mov dword [ebp - 0x24], 7
cmp dword [ebp - 0x6c], 8
mov dword [ebp - 0x28], 0
mov word [ebp - 0x38], ax
jb 0x507e23
push dword [ebp - 0x80]
call fcn.00412895
add esp, 4
mov ecx, edi
call fcn.00501680
test eax, eax
je 0x507f15
mov ecx, ebx
call fcn.0051a9a0
cmp dword [edi + 0x4c], 0
jne 0x507e59
push 0
push 0
push 1
push 0x509900
push 0
push 0
call fcn.00537b86
add esp, 0x18
mov dword [edi + 0x4c], eax
mov ecx, edi
call fcn.005050b0
mov ecx, edi
call fcn.00503bb0
cmp eax, 1
je 0x507ea5
push 0x5a2440
lea ecx, [ebp - 0x80]
call fcn.00408738
sub esp, 0x18
mov ecx, esp
push 0x594314
call fcn.00408738
lea eax, [edi + 0x4a4]
push eax
lea eax, [ebp - 0x80]
push eax
push 2
call fcn.004bf6a0
add esp, 0x24
lea ecx, [ebp - 0x80]
call fcn.0040329c
mov ecx, esi
call fcn.004f5680
mov ecx, edi
test al, al
jne 0x507f79
call fcn.00503bb0
cmp eax, 2
jne 0x507ed5
push 0x594314
push 0
push 0
push 0x141
push 0x5a29b0
jmp 0x507ef4
mov ecx, edi
call fcn.00503bb0
cmp eax, 3
jne 0x507f58
push 0x594314
push 0
push 0
push 0x141
push 0x5a29e8
call fcn.004c0730
add esp, 0x14
cmp eax, 1
je 0x507f58
mov dword [edi + 0x480], 3
mov dword [edi + 0x484], 0
xor esi, esi
cmp dword [ebp - 0xc], 8
jb 0x507f28
push dword [ebp - 0x20]
call fcn.00412895
add esp, 4
xor eax, eax
mov dword [ebp - 0xc], 7
mov dword [ebp - 0x10], 0
mov word [ebp - 0x20], ax
cmp dword [ebp - 0x54], 8
jb 0x507f4d
push dword [ebp - 0x68]
call fcn.00412895
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, edi
call fcn.005025f0
push eax
mov dword [edi + 0x74], eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x507f7e
mov dword [edi + 0x480], 7
jmp 0x507f15
call fcn.00507f90
mov esi, 1
jmp 0x507f17