Function at 0x408090
Capabilities:
Hide graphical window

Disassembly:
push 0xffffffffffffffff
push 0x527810
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x56b1dc]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x34]
mov eax, dword [ebp + 0x3c]
mov ebx, dword [0x531444]
push 0
push 0
lea esi, [ebp + 0x3c]
push 0x1004
push eax
call ebx
test eax, eax
jle 0x408334
mov ecx, dword [esi]
push 2
push 0xffffffffffffffff
push 0x100c
push ecx
call ebx
mov edi, eax
cmp edi, 0xffffffff
je 0x408334
mov edx, dword [0x5759e8]
mov eax, dword [edx + 0xc]
mov ecx, 0x5759e8
call eax
add eax, 0x10
mov dword [esp + 0x34], eax
push edi
push esi
lea eax, [esp + 0x3c]
mov dword [esp + 0x34], 0
call fcn.0040d630
mov ecx, dword [esi]
push 0
push edi
push 0x1008
push ecx
call ebx
mov edx, dword [0x5759e8]
mov eax, dword [edx + 0xc]
mov ecx, 0x5759e8
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov byte [esp + 0x2c], 1
mov edx, dword [0x5759e8]
mov eax, dword [edx + 0xc]
mov ecx, 0x5759e8
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x2c], 2
mov edi, dword [esp + 0x34]
cmp dword [edi - 0xc], 0
jle 0x4082c6
push 0x2d
push edi
call fcn.00500984
add esp, 8
test eax, eax
je 0x4082c6
sub eax, edi
sar eax, 1
mov esi, eax
cmp esi, 0xffffffff
je 0x4082c6
lea ecx, [esp + 0x18]
lea edx, [esp + 0x34]
call fcn.00401d40
mov ebx, eax
mov byte [esp + 0x2c], 3
call fcn.0040d970
mov edi, eax
call fcn.0040d9f0
lea edi, [esp + 0x20]
call fcn.00401dd0
mov byte [esp + 0x2c], 2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4081e1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esi + 1]
lea esi, [esp + 0x18]
lea edx, [esp + 0x34]
call fcn.0040d210
mov ebx, eax
mov byte [esp + 0x2c], 4
call fcn.0040d970
mov edi, eax
call fcn.0040d9f0
lea edi, [esp + 0x1c]
call fcn.00401dd0
mov byte [esp + 0x2c], 2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408232
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x24]
push edx
push ebp
call fcn.004071e0
test eax, eax
je 0x4082c2
mov eax, dword [eax + 0x14]
sub dword [ebp + 0x48], eax
mov ebx, ebp
call fcn.0040d130
lea ecx, [esp + 0x18]
call fcn.00402680
mov byte [esp + 0x2c], 5
call fcn.0040d130
add eax, dword [ebp + 0x48]
lea edi, [esp + 0x18]
push eax
push 0x53572c
call fcn.00401f20
mov ecx, dword [ebp + 8]
mov esi, dword [0x5313fc]
add esp, 8
push 0x42c
push ecx
call esi
mov edx, dword [esp + 0x18]
push edx
push eax
call dword [0x53142c]
mov ecx, edi
call fcn.00402660
call fcn.0040d130
add eax, dword [ebp + 0x48]
cmp eax, 0x2800
jae 0x4082c2
mov eax, dword [ebp + 8]
push 0x42d
push eax
call esi
push 0
push eax
call dword [0x53143c]
mov edi, dword [esp + 0x34]
mov byte [esp + 0x2c], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4082eb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x2c], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408310
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0x2c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408334
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 4