Function at 0x409ae0
Capabilities:
Create thread

Disassembly:
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x48]
xor ebp, ebp
cmp edi, ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x10], ebp
je 0x409e53
mov ebx, dword [esp + 0x4c]
cmp bx, bp
jbe 0x409e53
cmp bx, 0xffff
jne 0x409b23
pop edi
pop esi
pop ebp
mov ax, 3
pop ebx
add esp, 0x34
ret 0xc
push edi
call fcn.00405c70
add eax, 0x18
mov dword [esp + 0x48], eax
cmp word [eax], 0x7242
jne 0x409b6d
test byte [eax + 0x12], 4
jne 0x409b51
pop edi
pop esi
mov word [eax + 6], 2
pop ebp
mov ax, 2
pop ebx
add esp, 0x34
ret 0xc
push edi
call fcn.00406f10
mov ecx, dword [0x462a4c]
push ecx
push eax
call fcn.0040a870
mov esi, eax
add esp, 0xc
cmp esi, ebp
jne 0x409b7b
pop edi
pop esi
pop ebp
mov ax, 2
pop ebx
add esp, 0x34
ret 0xc
push edi
lea ebp, [esi + 0x1d8]
call fcn.00405c70
mov dword [eax + 8], ebp
mov dl, byte [esi + 0x5a4]
lea eax, [esi + 0x522]
lea ebp, [esi + 0x4f8]
push edx
push eax
push ebp
push 0
push edi
call fcn.00408b90
and ebx, 0xffff
push ebx
push edi
call fcn.004074b0
test ax, ax
jne 0x409e57
lea ecx, [esp + 0x10]
push ecx
push edi
call fcn.00409a80
add esp, 8
test ax, ax
je 0x409bf2
push edi
call fcn.00407660
test ax, ax
jne 0x409b15
lea edx, [esp + 0x10]
push edx
push edi
call fcn.00409a80
add esp, 8
test ax, ax
jne 0x409bd0
mov ax, word [esp + 0x10]
cmp word [esi + 0x76], 0
mov ebx, dword [sym.imp.USER32.dll_GetSystemMetrics]
mov word [esi + 0x1a4], ax
je 0x409c2d
push 0x1000
call ebx
test eax, eax
je 0x409c2d
mov ecx, dword [esp + 0x48]
pop edi
mov eax, 0x46
pop esi
pop ebp
mov word [ecx + 6], ax
pop ebx
add esp, 0x34
ret 0xc
cmp dword [esi + 0x1c0], 1
jne 0x409c3c
push edi
call fcn.00408f20
cmp word [esp + 0x50], 1
jne 0x409dea
cmp word [0x460f1a], 0
jne 0x409cd1
lea edx, [esp + 0x1c]
push edx
call fcn.00402120
add esp, 4
test eax, eax
je 0x409c7a
mov ecx, dword [esp + 0x48]
pop edi
mov eax, 0x4a
pop esi
pop ebp
mov word [ecx + 6], ax
pop ebx
add esp, 0x34
ret 0xc
push 0
lea edx, [esp + 0x20]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
mov dword [0x460f20], eax
jne 0x409ca9
mov ecx, dword [esp + 0x48]
pop edi
mov eax, 0x4a
pop esi
pop ebp
mov word [ecx + 6], ax
pop ebx
add esp, 0x34
ret 0xc
lea edx, [esp + 0x4c]
push edx
push 0
push 0
push 0x404080
push 0
push 0
call fcn.004400f2
add esp, 0x18
mov dword [0x460f24], eax
mov word [0x460f1a], 1
cmp word [esi + 0x76], 0
je 0x409cfa
push 0x1000
call ebx
test eax, eax
je 0x409cfa
mov ecx, dword [esp + 0x48]
pop edi
mov eax, 0x46
pop esi
pop ebp
mov word [ecx + 6], ax
pop ebx
add esp, 0x34
ret 0xc
lea edx, [esp + 0x18]
lea eax, [esp + 0x14]
push edx
push eax
push edi
call fcn.00407010
add esp, 0xc
test eax, eax
jne 0x409d28
mov ecx, dword [esp + 0x48]
pop edi
mov eax, 0x46
pop esi
pop ebp
mov word [ecx + 6], ax
pop ebx
add esp, 0x34
ret 0xc
mov bx, word [esp + 0x14]
mov ecx, dword [0x460ef4]
neg bx
lea edx, [esp + 0x28]
sbb ebx, ebx
push edx
push edi
and ebx, ecx
call fcn.004071b0
push 0
push 0
mov eax, dword [esp + 0x50]
push 0
xor ecx, ecx
push ebx
mov cx, word [eax + 0x38]
xor edx, edx
mov dx, word [eax + 0x36]
push 1
push 1
push ecx
push edx
push eax
call fcn.0040a170
add esp, 0x24
test ax, ax
je 0x409d8f
push 0x404
push edi
call fcn.00407300
push edi
call fcn.004073e0
pop edi
pop esi
pop ebp
mov ax, 0x46
pop ebx
add esp, 0x34
ret 0xc
mov al, byte [esp + 0x33]
cmp al, 5
je 0x409d9f
cmp al, 7
je 0x409d9f
cmp al, 8
jne 0x409ddd
mov eax, dword [esp + 0x3b]
mov ecx, dword [esp + 0x3a]
and eax, 0xff
and ecx, 0xff
shl eax, 8
add eax, ecx
test ah, 0x40
je 0x409ddd
mov eax, dword [esi + 0x1c4]
test eax, eax
je 0x409ddd
mov dl, byte [esi + 0x5a4]
add esi, 0x1c8
push edx
push 0
push ebp
push esi
push edi
call fcn.00408b90
pop edi
pop esi
pop ebp
xor ax, ax
pop ebx
add esp, 0x34
ret 0xc
lea eax, [esp + 0x28]
push eax
push edi
call fcn.004071b0
mov ebx, eax
mov al, byte [esp + 0x33]
cmp al, 5
je 0x409e07
cmp al, 7
je 0x409e07
cmp al, 8
jne 0x409e46
mov ecx, dword [esp + 0x3b]
mov edx, dword [esp + 0x3a]
and ecx, 0xff
and edx, 0xff
shl ecx, 8
add ecx, edx
test ch, 0x40
je 0x409e46
mov eax, dword [esi + 0x1c4]
test eax, eax
je 0x409e46
mov al, byte [esi + 0x5a4]
add esi, 0x1c8
push eax
push 0
push ebp
push esi
push edi
call fcn.00408b90
pop edi
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 0x34
ret 0xc
mov ax, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret 0xc