Function at 0x40eac0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55df3e
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x5b1700]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 4]
xor ebx, ebx
mov dword [ebp - 0x18], 0x5c60e0
mov dword [0x5c60e0], eax
mov dword [0x5c60e8], ebx
mov dword [0x5c60ec], ebx
mov dword [0x5c60f0], ebx
mov dword [0x5c60f4], ebx
xor eax, eax
mov dword [ebp - 4], ebx
mov ecx, 0x5c60f8
mov dword [0x5c60f8], eax
mov dword [0x5c60fc], eax
mov dword [0x5c6100], eax
mov dword [0x5c6104], eax
mov dword [0x5c6108], eax
mov dword [0x5c610c], eax
call fcn.0040ef90
cmp eax, ebx
jge 0x40eb4a
push eax
call fcn.00406930
mov esi, dword [0x56743c]
push ebx
push ebx
push ebx
push ebx
call esi
mov dword [0x5c6110], eax
mov dword [0x5c6114], ebx
push ebx
push ebx
push 1
push ebx
call esi
mov dword [0x5c6118], eax
push ebx
push ebx
push 1
push ebx
call esi
mov dword [0x5c611c], eax
push ebx
push 1
push 1
push ebx
call esi
mov dword [0x5c6120], eax
mov dword [0x5c6124], ebx
mov byte [ebp - 4], 7
mov edx, dword [0x5c4c54]
mov eax, dword [edx + 0xc]
mov ecx, 0x5c4c54
call eax
add eax, 0x10
mov dword [0x5c6128], eax
mov dword [0x5c6130], ebx
mov byte [ebp - 4], 9
cmp dword [0x5c60e0], ebx
jle 0x40eea8
mov al, byte [edi + 8]
cmp al, bl
mov byte [0x5c612c], al
je 0x40ebd7
push 0xfffffffffffffff5
call dword [0x567414]
mov dword [0x5c6130], eax
lea ecx, [ebp - 0x10]
push ecx
call fcn.0040f020
add esp, 4
lea edx, [ebp - 0x30]
push edx
mov byte [ebp - 4], 0xa
call dword [0x56741c]
lea eax, [ebp - 0x14]
push eax
call fcn.0040f170
add esp, 4
mov byte [ebp - 4], 0xb
movzx ecx, word [ebp - 0x26]
movzx edx, word [ebp - 0x28]
push ecx
movzx ecx, word [ebp - 0x2a]
push edx
movzx edx, word [ebp - 0x2e]
push ecx
movzx ecx, word [ebp - 0x30]
push edx
mov edx, dword [eax]
push ecx
push edx
push str..__s___04u__02u__02u__02u__02u_
lea edi, [ebp - 0x10]
call fcn.0040f150
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
add esp, 0x1c
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ec50
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ecx
mov ecx, esp
mov dword [ebp - 0x14], esp
push ecx
mov ecx, str..txt
call fcn.00406c00
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x10]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x1c], esp
mov esi, esp
call fcn.00406b50
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 0xa
call fcn.0040f490
cmp dword [0x5c6114], ebx
jne 0x40edf9
mov edx, dword [ebp - 0x10]
push 0x5c
push edx
call fcn.004f704c
add esp, 8
cmp eax, ebx
je 0x40ecb7
sub eax, dword [ebp - 0x10]
sar eax, 1
js 0x40ecb7
lea ecx, [ebp - 0x10]
push ecx
add eax, 1
xor ecx, ecx
call fcn.0040f3b0
push ecx
mov edx, esp
mov dword [ebp - 0x1c], esp
push edx
mov ecx, str..txt
call fcn.00406c00
mov byte [ebp - 4], 0xd
mov eax, dword [ebp - 0x10]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x14], esp
mov esi, esp
call fcn.00406b50
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 0xa
call fcn.0040f490
cmp dword [0x5c6114], ebx
jne 0x40edf9
mov eax, dword [0x5c4c54]
mov edx, dword [eax + 0xc]
mov ecx, 0x5c4c54
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
push ebx
mov byte [ebp - 4], 0xe
mov edi, dword [0x5673e0]
push ebx
call edi
mov edx, dword [esi - 8]
add eax, 1
mov ecx, 1
sub ecx, dword [esi - 4]
sub edx, eax
or edx, ecx
jge 0x40ed3b
mov ecx, eax
lea eax, [ebp - 0x14]
call fcn.00406670
mov esi, dword [ebp - 0x14]
cmp dword [esi - 4], 1
jle 0x40ed51
mov eax, dword [esi - 0xc]
push eax
lea ecx, [ebp - 0x14]
push ecx
call fcn.004066c0
mov esi, dword [ebp - 0x14]
mov eax, dword [esi - 8]
push esi
push eax
call edi
mov edx, dword [esi - 8]
cmp eax, edx
jge 0x40edcd
mov eax, esi
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40ed64
sub eax, edi
sar eax, 1
js 0x40ee4f
cmp eax, edx
jg 0x40ee4f
mov dword [esi - 0xc], eax
mov word [esi + eax*2], bx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea edx, [ebp - 0x14]
push edx
call fcn.00406950
push ecx
mov eax, esp
mov dword [ebp - 0x1c], esp
push eax
mov ecx, str..txt
call fcn.00406c00
mov byte [ebp - 4], 0xf
mov esi, dword [ebp - 0x14]
push ecx
lea eax, [esi - 0x10]
mov dword [ebp - 0x20], esp
mov edi, esp
call fcn.00406b50
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 0xe
call fcn.0040f490
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0xa
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40eded
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [0x5c6114], ebx
je 0x40ee85
mov ecx, dword [0x5c6128]
push ecx
call fcn.0040f5e0
add esp, 4
push ebx
push ebx
push 0x5c60e0
push 0x40f630
push ebx
push ebx
call fcn.004f72c7
add esp, 0x18
lea edx, [ebp - 0x14]
push edx
push eax
mov dword [0x5c6124], eax
mov dword [ebp - 0x14], ebx
call dword [0x5673e4]
test eax, eax
jne 0x40ee59
call dword [0x567314]
cmp eax, ebx
jle 0x40ee49
and eax, 0xffff
or eax, 0x80070000
push eax
call fcn.00406930
push 0x80070057
call fcn.00406930
mov eax, dword [0x5c6118]
push 0x4e20
push eax
call dword [0x5673e8]
cmp eax, 0x102
jne 0x40ee7b
push 0x800705b4
call fcn.00406930
call fcn.0040f980
call fcn.0040fc70
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40eea8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x5c60e0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret