Function at 0x40e5d0
Capabilities:
Create thread

Disassembly:
sub esp, 0x40
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x54]
xor esi, esi
cmp edi, esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], esi
je 0x40e8f3
mov ebp, dword [esp + 0x58]
cmp bp, si
jbe 0x40e8f3
cmp bp, 0xffff
jne 0x40e613
pop edi
pop esi
pop ebp
mov ax, 3
pop ebx
add esp, 0x40
ret 0xc
push edi
call fcn.0040ce80
mov ebx, eax
add ebx, 0x18
cmp word [ebx], 0x7242
jne 0x40e69b
test byte [ebx + 0x12], 4
jne 0x40e63e
mov eax, 2
pop edi
pop esi
mov word [ebx + 6], ax
pop ebp
pop ebx
add esp, 0x40
ret 0xc
push ebp
push edi
call fcn.004133d0
cmp ax, si
jne 0x40e8f7
lea eax, [esp + 0x10]
push eax
push edi
call fcn.0040e570
add esp, 8
test ax, ax
je 0x40e67f
push edi
call fcn.00413580
cmp ax, si
jne 0x40e605
lea ecx, [esp + 0x10]
push ecx
push edi
call fcn.0040e570
add esp, 8
test ax, ax
jne 0x40e661
push edi
call fcn.0040e110
mov edx, dword [0x4918ec]
push edx
push eax
call fcn.0040f3f0
mov ebp, eax
add esp, 0xc
cmp ebp, esi
jne 0x40e6a9
pop edi
pop esi
pop ebp
mov ax, 2
pop ebx
add esp, 0x40
ret 0xc
mov ax, word [esp + 0x10]
cmp word [ebp + 0x76], si
mov word [ebp + 0x1a4], ax
je 0x40e6dd
push 0x1000
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x40e6dd
mov eax, 0x46
pop edi
pop esi
mov word [ebx + 6], ax
pop ebp
pop ebx
add esp, 0x40
ret 0xc
mov eax, dword [ebp + 0x1c4]
mov esi, 1
cmp eax, esi
jne 0x40e6f2
push edi
call fcn.00415440
cmp word [esp + 0x5c], si
jne 0x40e88a
cmp word [0x48fe26], 0
jne 0x40e77c
lea ecx, [esp + 0x1c]
push ecx
call fcn.00409170
add esp, 4
test eax, eax
je 0x40e72b
mov eax, 0x4a
pop edi
pop esi
mov word [ebx + 6], ax
pop ebp
pop ebx
add esp, 0x40
ret 0xc
push 0
lea edx, [esp + 0x20]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
mov dword [0x48fe2c], eax
jne 0x40e756
mov eax, 0x4a
pop edi
pop esi
mov word [ebx + 6], ax
pop ebp
pop ebx
add esp, 0x40
ret 0xc
lea eax, [esp + 0x54]
push eax
push 0
push 0
push 0x40b0f0
push 0
push 0
call fcn.00435289
add esp, 0x18
mov dword [0x48fe30], eax
mov word [0x48fe26], si
cmp word [ebp + 0x76], 0
je 0x40e7a5
push 0x1000
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x40e7a5
mov eax, 0x46
pop edi
pop esi
mov word [ebx + 6], ax
pop ebp
pop ebx
add esp, 0x40
ret 0xc
lea ecx, [esp + 0x18]
lea edx, [esp + 0x14]
push ecx
push edx
push edi
call fcn.0040e210
add esp, 0xc
test eax, eax
jne 0x40e7cf
mov eax, 0x46
pop edi
pop esi
mov word [ebx + 6], ax
pop ebp
pop ebx
add esp, 0x40
ret 0xc
mov si, word [esp + 0x14]
mov edx, dword [0x48fe14]
neg si
lea eax, [esp + 0x38]
sbb esi, esi
push eax
push edi
and esi, edx
call fcn.004130c0
mov cx, word [ebx + 0x38]
mov dx, word [ebx + 0x36]
push 0
push 0
push 0
push esi
push 1
push 1
push ecx
push edx
push ebx
call fcn.0040ed10
add esp, 0x24
test ax, ax
je 0x40e82e
push 0x404
push edi
call fcn.00413210
push edi
call fcn.004132f0
pop edi
pop esi
pop ebp
mov ax, 0x46
pop ebx
add esp, 0x40
ret 0xc
mov al, byte [esp + 0x3f]
cmp al, 5
je 0x40e83a
cmp al, 7
jne 0x40e87d
mov eax, dword [esp + 0x47]
mov ecx, dword [esp + 0x46]
and eax, 0xff
and ecx, 0xff
shl eax, 8
add eax, ecx
test ah, 0x40
je 0x40e87d
mov eax, dword [ebp + 0x1c8]
test eax, eax
je 0x40e87d
lea edx, [esp + 0x28]
add ebp, 0x1cc
push edx
push ebp
call fcn.004154c0
lea eax, [esp + 0x28]
push eax
push edi
call fcn.004150f0
pop edi
pop esi
pop ebp
xor ax, ax
pop ebx
add esp, 0x40
ret 0xc
lea ecx, [esp + 0x38]
push ecx
push edi
call fcn.004130c0
mov ebx, eax
mov al, byte [esp + 0x3f]
cmp al, 5
je 0x40e8a3
cmp al, 7
jne 0x40e8e6
mov edx, dword [esp + 0x47]
mov eax, dword [esp + 0x46]
and edx, 0xff
and eax, 0xff
shl edx, 8
add edx, eax
test dh, 0x40
je 0x40e8e6
mov eax, dword [ebp + 0x1c8]
test eax, eax
je 0x40e8e6
lea ecx, [esp + 0x28]
add ebp, 0x1cc
push ecx
push ebp
call fcn.004154c0
lea edx, [esp + 0x28]
push edx
push edi
call fcn.004150f0
pop edi
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 0x40
ret 0xc
mov ax, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret 0xc