Function at 0x405680
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x114
mov eax, dword [ebp + 8]
lea ecx, [entry0]
mov edx, dword [ebp - 0x40]
and edx, 0
mov dword [ebp - 0x40], edx
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0xbc], 1
mov esi, dword [ebp - 0xbc]
mov dword [ebp - 0xa0], 1
mov edi, dword [ebp - 0xa0]
mov dword [ebp - 0xac], 0
mov ebx, dword [ebp - 0xac]
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x9c], 0x100000
mov word [ebp - 0xbe], 0xec4
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0x3c], 7
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xe0], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0xb4], 0x100000
mov dword [ebp - 0xe4], eax
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 0x50], 0
mov dword [ebp - 0xe8], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x74], 0x1c
mov dword [ebp - 0x34], 0
mov dword [ebp - 0xec], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0xa4], 0x14
mov dword [ebp - 0xf0], eax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0xf4], eax
mov eax, dword [ebp - 0xdc]
mov dword [ebp - 0xb0], eax
mov dword [0x40a244], ecx
mov byte [ebp - 0xd], 0x7d
mov ecx, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0xf8], ebx
mov dword [ebp - 0xfc], edx
mov dword [ebp - 0x100], esi
mov dword [ebp - 0x104], edi
call ecx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0xec]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0xe8]
add ecx, dword [ebp - 0xb0]
cmp eax, ecx
jge 0x405957
lea eax, [ebp - 0x34]
lea ecx, [ebp - 0xd2]
lea edx, [ebp - 0x2d]
mov bl, byte [ebp - 0xd]
mov bh, al
or bl, bh
mov byte [ebp - 0xd], bl
mov dword [esp], edx
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0xf4]
mov dword [esp + 8], eax
call fcn.00401540
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x4c], 0
mov edx, dword [ebp - 0xe0]
cmp ecx, edx
mov dword [ebp - 0x108], eax
jne 0x4058e7
lea eax, [ebp - 0x94]
lea ecx, [ebp - 0x70]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xf0]
mov dword [esp + 8], eax
call fcn.00401540
mov ecx, 0
mov edx, dword [ebp - 0xb0]
sub ecx, dword [ebp - 0xa8]
mov dword [ebp - 0xa8], ecx
mov ecx, dword [ebp - 0xe4]
cmp edx, ecx
mov dword [ebp - 0x10c], eax
jne 0x4058bc
mov eax, 0
mov cx, 0
mov edx, dword [ebp - 0x34]
sub cx, word [ebp - 0xbe]
sub eax, edx
mov word [ebp - 0xbe], cx
mov edx, dword [sym.imp.KERNEL32.dll_FreeConsole]
mov dword [ebp - 0x110], eax
call edx
mov edx, dword [ebp - 0xf8]
mov dword [esp], edx
mov dword [ebp - 0x114], eax
call fcn.00405300
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0x4c], eax
mov edx, dword [ebp - 0x104]
mov dword [ebp - 0x38], edx
jmp 0x40598d
lea eax, [ebp - 0x34]
mov ecx, dword [ebp - 0x98]
mov edx, dword [ebp - 0xa8]
and edx, 0
mov dword [ebp - 0xa8], edx
mov edx, dword [ebp - 0x98]
and edx, eax
mov dword [ebp - 0x34], edx
or ecx, eax
mov dword [ebp - 0x34], ecx
mov eax, dword [sym.imp.KERNEL32.dll_TlsAlloc]
call eax
lea ecx, [ebp - 0xa8]
mov dword [ebp - 0x78], eax
mov dx, word [ebp - 0xbe]
mov si, cx
mov eax, dword [ebp - 0xa8]
add eax, 0
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0x34], 0
xor dx, si
mov word [ebp - 0xbe], dx
lea eax, [ebp - 0x34]
mov cl, 0xfa
mov edx, dword [ebp - 0x48]
mov esi, dword [ebp - 0x100]
add edx, esi
mov dword [ebp - 0x48], edx
sub cl, byte [ebp - 0xd]
mov byte [ebp - 0xd], cl
mov edx, dword [ebp - 0x34]
xor edx, eax
mov eax, dword [ebp - 0x98]
add eax, 0
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x34], eax
jmp 0x4057b9
lea eax, [ebp - 0xa8]
lea ecx, [ebp - 0x4c]
mov edx, dword [ebp - 0xfc]
mov dword [ebp - 0x38], edx
mov esi, dword [ebp - 0xa8]
mov edi, dword [ebp - 0x4c]
xor edi, 0
mov bl, byte [ebp - 0xd]
mov bh, al
or bl, bh
mov byte [ebp - 0xd], bl
mov dword [ebp - 0xa8], edi
and esi, ecx
mov dword [ebp - 0x4c], esi
mov eax, 0
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x38]
sub eax, ecx
mov dword [ebp - 0xa8], eax
mov eax, edx
add esp, 0x114
pop esi
pop edi
pop ebx
pop ebp
ret