Function at 0x4058e0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x58]
push ebx
sub esp, 0x20c
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll__setjmp3
test eax, eax
jne 0x40643a
mov eax, dword [ebp + 8]
mov esi, dword [eax]
lea eax, [ebp - 0x58]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x80], esi
sub esi, 0x20
mov dword [ebp - 0x64], esi
cmp eax, esi
jae 0x406442
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 8]
add esi, 0x34
mov dword [ebp - 0x60], esi
jmp 0x405ad7
mov edi, dword [ebx + 0x20]
mov dword [edi + eax*4], esi
add dword [ebx + 0x18], 1
mov eax, dword [ebp - 0x5c]
mov edx, dword [eax + 4]
mov edi, eax
cmp edx, 0x1000
jbe 0x40597e
mov ecx, dword [ebp - 0x60]
call fcn.004057d0
mov esi, eax
test eax, eax
je 0x40597e
add dword [eax], 8
mov edx, dword [ebx + 0x1c]
mov eax, dword [ebx + 0x18]
cmp edx, eax
jle 0x405e50
mov ecx, dword [ebx + 0x20]
mov dword [ebp - 0x68], ecx
mov dword [ecx + eax*4], esi
add dword [ebx + 0x18], 1
mov edx, dword [edi + 8]
cmp edx, 0x1000
jbe 0x4059b5
mov ecx, dword [ebp - 0x60]
call fcn.004057d0
mov esi, eax
test eax, eax
je 0x4059b5
add dword [eax], 8
mov edx, dword [ebx + 0x1c]
mov eax, dword [ebx + 0x18]
cmp edx, eax
jle 0x405f80
mov ecx, dword [ebx + 0x20]
mov dword [ebp - 0x6c], ecx
mov dword [ecx + eax*4], esi
add dword [ebx + 0x18], 1
mov edx, dword [edi + 0xc]
cmp edx, 0x1000
jbe 0x4059ec
mov ecx, dword [ebp - 0x60]
call fcn.004057d0
mov esi, eax
test eax, eax
je 0x4059ec
add dword [eax], 8
mov edx, dword [ebx + 0x1c]
mov eax, dword [ebx + 0x18]
cmp edx, eax
jle 0x4060b0
mov ecx, dword [ebx + 0x20]
mov dword [ebp - 0x70], ecx
mov dword [ecx + eax*4], esi
add dword [ebx + 0x18], 1
mov edx, dword [edi + 0x10]
cmp edx, 0x1000
jbe 0x405a23
mov ecx, dword [ebp - 0x60]
call fcn.004057d0
mov esi, eax
test eax, eax
je 0x405a23
add dword [eax], 8
mov edx, dword [ebx + 0x1c]
mov eax, dword [ebx + 0x18]
cmp edx, eax
jle 0x4061e0
mov ecx, dword [ebx + 0x20]
mov dword [ebp - 0x74], ecx
mov dword [ecx + eax*4], esi
add dword [ebx + 0x18], 1
mov edx, dword [edi + 0x14]
cmp edx, 0x1000
jbe 0x405a5a
mov ecx, dword [ebp - 0x60]
call fcn.004057d0
mov esi, eax
test eax, eax
je 0x405a5a
add dword [eax], 8
mov edx, dword [ebx + 0x1c]
mov eax, dword [ebx + 0x18]
cmp edx, eax
jle 0x406310
mov ecx, dword [ebx + 0x20]
mov dword [ebp - 0x78], ecx
mov dword [ecx + eax*4], esi
add dword [ebx + 0x18], 1
mov edx, dword [edi + 0x18]
cmp edx, 0x1000
jbe 0x405a91
mov ecx, dword [ebp - 0x60]
call fcn.004057d0
mov esi, eax
test eax, eax
je 0x405a91
add dword [eax], 8
mov edx, dword [ebx + 0x1c]
mov eax, dword [ebx + 0x18]
cmp edx, eax
jle 0x405c10
mov ecx, dword [ebx + 0x20]
mov dword [ebp - 0x7c], ecx
mov dword [ecx + eax*4], esi
add dword [ebx + 0x18], 1
mov edx, dword [edi + 0x1c]
cmp edx, 0x1000
jbe 0x405ac5
mov ecx, dword [ebp - 0x60]
call fcn.004057d0
mov esi, eax
test eax, eax
je 0x405ac5
add dword [eax], 8
mov edx, dword [ebx + 0x1c]
mov eax, dword [ebx + 0x18]
cmp edx, eax
jle 0x405d40
mov edi, dword [ebx + 0x20]
mov dword [edi + eax*4], esi
add dword [ebx + 0x18], 1
add dword [ebp - 0x5c], 0x20
mov edi, dword [ebp - 0x5c]
mov eax, edi
cmp edi, dword [ebp - 0x64]
jae 0x406442
mov edx, dword [eax]
cmp edx, 0x1000
jbe 0x405942
mov ecx, dword [ebp - 0x60]
call fcn.004057d0
mov esi, eax
test eax, eax
je 0x405942
add dword [eax], 8
mov edx, dword [ebx + 0x1c]
mov eax, dword [ebx + 0x18]
cmp edx, eax
jg 0x405938
lea edx, [edx + edx*2]
mov edi, dword [0x49c308]
mov eax, edx
shr eax, 0x1f
add eax, edx
sar eax, 1
mov dword [ebx + 0x1c], eax
shl eax, 2
mov dword [ebp - 0x84], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], edi
mov dword [ebp - 0x160], eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0xfc], eax
call eax
mov edx, dword [ebp - 0x160]
mov ecx, dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov edi, eax
mov dword [esp], edx
mov dword [ebp - 0x100], ecx
call ecx
mov edx, dword [ebp - 0x84]
lea ecx, [edi + 0x54]
sub esp, 4
add edx, 8
call fcn.00404070
mov dword [eax + 4], 1
mov edx, dword [ebx + 0x18]
lea edi, [eax + 8]
lea eax, [edx*4]
mov edx, dword [ebx + 0x20]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebx + 0x20]
mov ecx, dword [0x49c308]
mov dword [ebp - 0x88], edx
mov dword [ebp - 0x15c], ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x15c]
mov dword [ebp - 0x158], eax
mov eax, dword [ebp - 0xfc]
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x158]
mov ecx, dword [ebp - 0x100]
sub esp, 4
mov dword [ebp - 0x8c], eax
mov dword [esp], edx
call ecx
mov edx, dword [ebp - 0x88]
mov ecx, dword [ebp - 0x8c]
sub esp, 4
sub edx, 8
add ecx, 0x54
call fcn.00404df0
mov dword [ebx + 0x20], edi
mov eax, dword [ebx + 0x18]
jmp 0x40593b
lea edx, [edx + edx*2]
mov ecx, dword [0x49c308]
mov eax, edx
shr eax, 0x1f
mov dword [ebp - 0x1c0], ecx
add eax, edx
sar eax, 1
mov dword [ebx + 0x1c], eax
shl eax, 2
mov dword [ebp - 0xe0], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x140], eax
call eax
mov ecx, dword [ebp - 0x1c0]
mov dword [ebp - 0x1bc], eax
mov dword [esp], ecx
mov ecx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x144], ecx
call ecx
mov edx, dword [ebp - 0x1bc]
sub esp, 4
mov dword [ebp - 0xe8], eax
mov dword [esp], edx
mov edx, dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x148], edx
call edx
mov ecx, dword [ebp - 0xe0]
sub esp, 4
lea edx, [ecx + 8]
mov ecx, dword [ebp - 0xe8]
add ecx, 0x54
call fcn.00404070
mov dword [eax + 4], 1
mov edx, dword [ebx + 0x18]
lea ecx, [eax + 8]
mov dword [ebp - 0x7c], ecx
lea eax, [edx*4]
mov edx, dword [ebx + 0x20]
mov dword [esp], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebx + 0x20]
mov ecx, dword [0x49c308]
mov eax, dword [ebp - 0x140]
mov dword [ebp - 0xe4], edx
mov dword [ebp - 0x1b8], ecx
call eax
mov ecx, dword [ebp - 0x1b8]
mov dword [ebp - 0x1b4], eax
mov eax, dword [ebp - 0x144]
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x1b4]
sub esp, 4
mov dword [ebp - 0xec], eax
mov dword [esp], edx
mov edx, dword [ebp - 0x148]
call edx
mov eax, dword [ebp - 0xec]
mov edx, dword [ebp - 0xe4]
sub esp, 4
add eax, 0x54
sub edx, 8
mov ecx, eax
call fcn.00404df0
mov ecx, dword [ebp - 0x7c]
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x20], ecx
jmp 0x405a8a
lea edx, [edx + edx*2]
mov edi, dword [0x49c308]
mov eax, edx
shr eax, 0x1f
add eax, edx
sar eax, 1
mov dword [ebx + 0x1c], eax
shl eax, 2
mov dword [ebp - 0xf0], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14c], eax
call eax
mov dword [esp], edi
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x1cc], eax
mov dword [ebp - 0x150], edi
call edi
mov edx, dword [ebp - 0x1cc]
mov ecx, dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov edi, eax
mov dword [esp], edx
mov dword [ebp - 0x154], ecx
call ecx
mov edx, dword [ebp - 0xf0]
lea ecx, [edi + 0x54]
sub esp, 4
add edx, 8
call fcn.00404070
mov dword [eax + 4], 1
mov edx, dword [ebx + 0x18]
lea edi, [eax + 8]
lea eax, [edx*4]
mov edx, dword [ebx + 0x20]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebx + 0x20]
mov ecx, dword [0x49c308]
mov eax, dword [ebp - 0x14c]
mov dword [ebp - 0xf4], edx
mov dword [ebp - 0x1c8], ecx
call eax
mov ecx, dword [ebp - 0x1c8]
mov dword [ebp - 0x1c4], eax
mov eax, dword [ebp - 0x150]
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x1c4]
mov ecx, dword [ebp - 0x154]
sub esp, 4
mov dword [ebp - 0xf8], eax
mov dword [esp], edx
call ecx
mov edx, dword [ebp - 0xf4]
mov ecx, dword [ebp - 0xf8]
sub esp, 4
sub edx, 8
add ecx, 0x54
call fcn.00404df0
mov dword [ebx + 0x20], edi
mov eax, dword [ebx + 0x18]
jmp 0x405abe
lea edx, [edx + edx*2]
mov ecx, dword [0x49c308]
mov eax, edx
shr eax, 0x1f
mov dword [ebp - 0x170], ecx
add eax, edx
sar eax, 1
mov dword [ebx + 0x1c], eax
shl eax, 2
mov dword [ebp - 0x90], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x104], eax
call eax
mov ecx, dword [ebp - 0x170]
mov dword [ebp - 0x16c], eax
mov dword [esp], ecx
mov ecx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x108], ecx
call ecx
mov edx, dword [ebp - 0x16c]
sub esp, 4
mov dword [ebp - 0x98], eax
mov dword [esp], edx
mov edx, dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x10c], edx
call edx
mov ecx, dword [ebp - 0x90]
sub esp, 4
lea edx, [ecx + 8]
mov ecx, dword [ebp - 0x98]
add ecx, 0x54
call fcn.00404070
mov dword [eax + 4], 1
mov edx, dword [ebx + 0x18]
lea ecx, [eax + 8]
mov dword [ebp - 0x68], ecx
lea eax, [edx*4]
mov edx, dword [ebx + 0x20]
mov dword [esp], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebx + 0x20]
mov ecx, dword [0x49c308]
mov eax, dword [ebp - 0x104]
mov dword [ebp - 0x94], edx
mov dword [ebp - 0x168], ecx
call eax
mov ecx, dword [ebp - 0x168]
mov dword [ebp - 0x164], eax
mov eax, dword [ebp - 0x108]
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x164]
sub esp, 4
mov dword [ebp - 0x9c], eax
mov dword [esp], edx
mov edx, dword [ebp - 0x10c]
call edx
mov eax, dword [ebp - 0x9c]
mov edx, dword [ebp - 0x94]
sub esp, 4
add eax, 0x54
sub edx, 8
mov ecx, eax
call fcn.00404df0
mov ecx, dword [ebp - 0x68]
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x20], ecx
jmp 0x405977
lea edx, [edx + edx*2]
mov ecx, dword [0x49c308]
mov eax, edx
shr eax, 0x1f
mov dword [ebp - 0x180], ecx
add eax, edx
sar eax, 1
mov dword [ebx + 0x1c], eax
shl eax, 2
mov dword [ebp - 0xa0], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x110], eax
call eax
mov ecx, dword [ebp - 0x180]
mov dword [ebp - 0x17c], eax
mov dword [esp], ecx
mov ecx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x114], ecx
call ecx
mov edx, dword [ebp - 0x17c]
sub esp, 4
mov dword [ebp - 0xa8], eax
mov dword [esp], edx
mov edx, dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x118], edx
call edx
mov ecx, dword [ebp - 0xa0]
sub esp, 4
lea edx, [ecx + 8]
mov ecx, dword [ebp - 0xa8]
add ecx, 0x54
call fcn.00404070
mov dword [eax + 4], 1
mov edx, dword [ebx + 0x18]
lea ecx, [eax + 8]
mov dword [ebp - 0x6c], ecx
lea eax, [edx*4]
mov edx, dword [ebx + 0x20]
mov dword [esp], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebx + 0x20]
mov ecx, dword [0x49c308]
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0xa4], edx
mov dword [ebp - 0x178], ecx
call eax
mov ecx, dword [ebp - 0x178]
mov dword [ebp - 0x174], eax
mov eax, dword [ebp - 0x114]
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x174]
sub esp, 4
mov dword [ebp - 0xac], eax
mov dword [esp], edx
mov edx, dword [ebp - 0x118]
call edx
mov eax, dword [ebp - 0xac]
mov edx, dword [ebp - 0xa4]
sub esp, 4
add eax, 0x54
sub edx, 8
mov ecx, eax
call fcn.00404df0
mov ecx, dword [ebp - 0x6c]
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x20], ecx
jmp 0x4059ae
lea edx, [edx + edx*2]
mov ecx, dword [0x49c308]
mov eax, edx
shr eax, 0x1f
mov dword [ebp - 0x190], ecx
add eax, edx
sar eax, 1
mov dword [ebx + 0x1c], eax
shl eax, 2
mov dword [ebp - 0xb0], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x11c], eax
call eax
mov ecx, dword [ebp - 0x190]
mov dword [ebp - 0x18c], eax
mov dword [esp], ecx
mov ecx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x120], ecx
call ecx
mov edx, dword [ebp - 0x18c]
sub esp, 4
mov dword [ebp - 0xb8], eax
mov dword [esp], edx
mov edx, dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x124], edx
call edx
mov ecx, dword [ebp - 0xb0]
sub esp, 4
lea edx, [ecx + 8]
mov ecx, dword [ebp - 0xb8]
add ecx, 0x54
call fcn.00404070
mov dword [eax + 4], 1
mov edx, dword [ebx + 0x18]
lea ecx, [eax + 8]
mov dword [ebp - 0x70], ecx
lea eax, [edx*4]
mov edx, dword [ebx + 0x20]
mov dword [esp], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebx + 0x20]
mov ecx, dword [0x49c308]
mov eax, dword [ebp - 0x11c]
mov dword [ebp - 0xb4], edx
mov dword [ebp - 0x188], ecx
call eax
mov ecx, dword [ebp - 0x188]
mov dword [ebp - 0x184], eax
mov eax, dword [ebp - 0x120]
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x184]
sub esp, 4
mov dword [ebp - 0xbc], eax
mov dword [esp], edx
mov edx, dword [ebp - 0x124]
call edx
mov eax, dword [ebp - 0xbc]
mov edx, dword [ebp - 0xb4]
sub esp, 4
add eax, 0x54
sub edx, 8
mov ecx, eax
call fcn.00404df0
mov ecx, dword [ebp - 0x70]
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x20], ecx
jmp 0x4059e5
lea edx, [edx + edx*2]
mov ecx, dword [0x49c308]
mov eax, edx
shr eax, 0x1f
mov dword [ebp - 0x1a0], ecx
add eax, edx
sar eax, 1
mov dword [ebx + 0x1c], eax
shl eax, 2
mov dword [ebp - 0xc0], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x128], eax
call eax
mov ecx, dword [ebp - 0x1a0]
mov dword [ebp - 0x19c], eax
mov dword [esp], ecx
mov ecx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x12c], ecx
call ecx
mov edx, dword [ebp - 0x19c]
sub esp, 4
mov dword [ebp - 0xc8], eax
mov dword [esp], edx
mov edx, dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x130], edx
call edx
mov ecx, dword [ebp - 0xc0]
sub esp, 4
lea edx, [ecx + 8]
mov ecx, dword [ebp - 0xc8]
add ecx, 0x54
call fcn.00404070
mov dword [eax + 4], 1
mov edx, dword [ebx + 0x18]
lea ecx, [eax + 8]
mov dword [ebp - 0x74], ecx
lea eax, [edx*4]
mov edx, dword [ebx + 0x20]
mov dword [esp], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebx + 0x20]
mov ecx, dword [0x49c308]
mov eax, dword [ebp - 0x128]
mov dword [ebp - 0xc4], edx
mov dword [ebp - 0x198], ecx
call eax
mov ecx, dword [ebp - 0x198]
mov dword [ebp - 0x194], eax
mov eax, dword [ebp - 0x12c]
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x194]
sub esp, 4
mov dword [ebp - 0xcc], eax
mov dword [esp], edx
mov edx, dword [ebp - 0x130]
call edx
mov eax, dword [ebp - 0xcc]
mov edx, dword [ebp - 0xc4]
sub esp, 4
add eax, 0x54
sub edx, 8
mov ecx, eax
call fcn.00404df0
mov ecx, dword [ebp - 0x74]
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x20], ecx
jmp 0x405a1c
lea edx, [edx + edx*2]
mov ecx, dword [0x49c308]
mov eax, edx
shr eax, 0x1f
mov dword [ebp - 0x1b0], ecx
add eax, edx
sar eax, 1
mov dword [ebx + 0x1c], eax
shl eax, 2
mov dword [ebp - 0xd0], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x134], eax
call eax
mov ecx, dword [ebp - 0x1b0]
mov dword [ebp - 0x1ac], eax
mov dword [esp], ecx
mov ecx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x138], ecx
call ecx
mov edx, dword [ebp - 0x1ac]
sub esp, 4
mov dword [ebp - 0xd8], eax
mov dword [esp], edx
mov edx, dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x13c], edx
call edx
mov ecx, dword [ebp - 0xd0]
sub esp, 4
lea edx, [ecx + 8]
mov ecx, dword [ebp - 0xd8]
add ecx, 0x54
call fcn.00404070
mov dword [eax + 4], 1
mov edx, dword [ebx + 0x18]
lea ecx, [eax + 8]
mov dword [ebp - 0x78], ecx
lea eax, [edx*4]
mov edx, dword [ebx + 0x20]
mov dword [esp], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebx + 0x20]
mov ecx, dword [0x49c308]
mov eax, dword [ebp - 0x134]
mov dword [ebp - 0xd4], edx
mov dword [ebp - 0x1a8], ecx
call eax
mov ecx, dword [ebp - 0x1a8]
mov dword [ebp - 0x1a4], eax
mov eax, dword [ebp - 0x138]
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x1a4]
sub esp, 4
mov dword [ebp - 0xdc], eax
mov dword [esp], edx
mov edx, dword [ebp - 0x13c]
call edx
mov eax, dword [ebp - 0xdc]
mov edx, dword [ebp - 0xd4]
sub esp, 4
add eax, 0x54
sub edx, 8
mov ecx, eax
call fcn.00404df0
mov ecx, dword [ebp - 0x78]
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x20], ecx
jmp 0x405a53
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [ebp - 0x5c]
cmp dword [ebp - 0x80], ebx
jb 0x40643a
mov esi, dword [ebp + 8]
lea edi, [esi + 0x34]
mov dword [ebp - 0x1d4], edi
jmp 0x406472
mov ecx, dword [esi + 0x20]
mov dword [ebp - 0x1d0], ecx
mov dword [ecx + eax*4], edi
add dword [esi + 0x18], 1
add ebx, 4
mov eax, ebx
cmp ebx, dword [ebp - 0x80]
ja 0x40643a
mov edx, dword [eax]
cmp edx, 0x1000
jbe 0x406468
mov ecx, dword [ebp - 0x1d4]
call fcn.004057d0
mov edi, eax
test eax, eax
je 0x406468
add dword [eax], 8
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
cmp edx, eax
jg 0x406458
lea edx, [edx + edx*2]
mov ecx, dword [0x49c308]
mov eax, edx
shr eax, 0x1f
mov dword [ebp - 0x1fc], ecx
add eax, edx
sar eax, 1
mov dword [esi + 0x1c], eax
shl eax, 2
mov dword [ebp - 0x1d8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x1fc]
mov dword [ebp - 0x1f8], eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp], ecx
mov dword [ebp - 0x1e8], eax
call eax
mov edx, dword [ebp - 0x1f8]
mov ecx, dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov dword [ebp - 0x1e0], eax
mov dword [esp], edx
mov dword [ebp - 0x1ec], ecx
call ecx
mov edx, dword [ebp - 0x1d8]
mov ecx, dword [ebp - 0x1e0]
sub esp, 4
add edx, 8
add ecx, 0x54
call fcn.00404070
mov dword [eax + 4], 1
mov edx, dword [esi + 0x18]
lea ecx, [eax + 8]
mov dword [ebp - 0x1d0], ecx
lea eax, [edx*4]
mov edx, dword [esi + 0x20]
mov dword [esp], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [esi + 0x20]
mov ecx, dword [0x49c308]
mov dword [ebp - 0x1dc], edx
mov dword [ebp - 0x1f4], ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x1f4]
mov dword [ebp - 0x1f0], eax
mov eax, dword [ebp - 0x1e8]
mov dword [esp], ecx
call eax
mov edx, dword [ebp - 0x1f0]
sub esp, 4
mov dword [ebp - 0x1e4], eax
mov dword [esp], edx
mov edx, dword [ebp - 0x1ec]
call edx
mov eax, dword [ebp - 0x1e4]
mov edx, dword [ebp - 0x1dc]
sub esp, 4
add eax, 0x54
sub edx, 8
mov ecx, eax
call fcn.00404df0
mov ecx, dword [ebp - 0x1d0]
mov eax, dword [esi + 0x18]
mov dword [esi + 0x20], ecx
jmp 0x406461