Function at 0x4121eb
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2174
call fcn.00421df0
push ebx
push esi
push edi
xor eax, eax
push 7
pop ecx
mov byte [ebp - 0x50], 0
lea edi, [ebp - 0x4f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov edx, 0x3ff
mov byte [ebp - 0x1174], 0
mov ecx, edx
lea edi, [ebp - 0x1173]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [ebp - 0x2174], 0
mov ecx, edx
lea edi, [ebp - 0x2173]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x10
stosb byte es:[edi], al
xor ebx, ebx
xor esi, esi
lea eax, [ebp - 0x30]
push ebx
inc esi
push eax
mov dword [ebp - 0x14], esi
call fcn.00421c60
xor eax, eax
mov ax, word [0x459440]
add esp, 0xc
mov word [ebp - 0x30], 2
push eax
call dword [0x458cdc]
mov word [ebp - 0x2e], ax
lea eax, [ebp - 0x50]
push eax
xor eax, eax
mov ax, word [0x459440]
mov dword [ebp - 0x2c], ebx
push eax
push dword [0x459658]
call fcn.0041216e
add esp, 0xc
push ebx
push esi
push 2
call dword [0x458b74]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0xc], edi
jne 0x4122ad
push eax
call dword [0x458c90]
or eax, edi
jmp 0x4126a1
push 0x10
lea eax, [ebp - 0x30]
push eax
push edi
call dword [0x458c68]
cmp eax, 0xffffffff
jne 0x4122c7
push 0xfffffffffffffffe
pop esi
jmp 0x412698
push 0x7fffffff
push edi
call dword [0x458cb0]
cmp eax, 0xffffffff
jne 0x4122dc
push 0xfffffffffffffffd
jmp 0x4122c1
lea eax, [ebp - 0x14]
push eax
push 0x8004667e
push edi
call dword [0x458af0]
cmp eax, 0xffffffff
jne 0x4122f5
push 0xfffffffffffffffc
jmp 0x4122c1
cmp byte [0x4594f0], 0
mov dword [ebp - 0x20], 2
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x174], ebx
mov dword [0x459724], edi
mov dword [0x459720], esi
mov dword [ebp - 8], edi
mov byte [0x459824], 1
jne 0x412696
push 0x41
pop ecx
lea eax, [ebp - 0x20]
push eax
push ebx
push ebx
lea eax, [ebp - 0x174]
push eax
mov eax, dword [ebp - 8]
inc eax
mov esi, 0x459720
lea edi, [ebp - 0x174]
push eax
rep movsd dword es:[edi], dword [esi]
call dword [0x458c30]
cmp eax, 0xffffffff
je 0x4126a6
call fcn.004117b1
call fcn.004119f4
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x174]
push eax
push dword [ebp - 4]
call dword [0x458bd4]
test eax, eax
je 0x412677
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 4], eax
jne 0x412455
push 0x10
pop esi
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x70]
push ecx
push eax
mov dword [ebp - 0x10], esi
call dword [0x42a328]
mov edi, eax
cmp edi, 0xffffffff
je 0x412677
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x60]
push eax
push edi
mov dword [ebp - 0x18], esi
call dword [0x42a32c]
mov ebx, dword [ebp - 0x5c]
push 0
push ebx
call fcn.00411838
cmp eax, dword [0x45945c]
pop ecx
pop ecx
ja 0x41243e
cmp dword [0x459720], 0x40
jae 0x41243e
call fcn.00411762
cmp eax, 0x1f4
ja 0x41243e
call fcn.00411775
mov esi, eax
mov dword [esi + 4], ebx
mov dword [esi + 8], edi
call dword [0x42a20c]
mov dword [esi + 0x10], eax
mov eax, dword [0x459720]
xor ecx, ecx
test eax, eax
jbe 0x412415
cmp dword [ecx*4 + 0x459724], edi
je 0x412415
inc ecx
cmp ecx, eax
jb 0x412407
cmp ecx, eax
jne 0x41242b
cmp eax, 0x40
jae 0x41242b
mov dword [ecx*4 + 0x459724], edi
inc dword [0x459720]
xor ebx, ebx
cmp edi, dword [ebp - 8]
jbe 0x412677
mov dword [ebp - 8], edi
jmp 0x412677
push 2
push edi
call dword [0x42a330]
push edi
call dword [0x42a348]
xor ebx, ebx
jmp 0x412677
mov esi, 0x1000
push esi
lea eax, [ebp - 0x1174]
push ebx
push eax
call fcn.00421c60
push esi
lea eax, [ebp - 0x2174]
push ebx
push eax
call fcn.00421c60
mov edi, dword [ebp - 4]
add esp, 0x18
push ebx
push esi
lea eax, [ebp - 0x1174]
push eax
push edi
call dword [0x458ac0]
test eax, eax
jg 0x4124f4
mov eax, dword [0x459720]
xor ecx, ecx
cmp eax, ebx
jbe 0x4124cc
cmp dword [ecx*4 + 0x459724], edi
je 0x4124bf
inc ecx
cmp ecx, eax
jb 0x41249b
jmp 0x4124cc
mov eax, dword [ecx*4 + 0x459728]
mov dword [ecx*4 + 0x459724], eax
mov eax, dword [0x459720]
inc ecx
lea edx, [eax - 1]
cmp ecx, edx
jb 0x4124ab
dec eax
mov dword [0x459720], eax
push 2
push edi
call dword [0x42a330]
push edi
call dword [0x458c90]
push edi
call fcn.0041171d
cmp eax, ebx
pop ecx
je 0x412677
mov byte [eax + 0xe], 1
jmp 0x412677
push 0xa
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x1174]
push eax
call fcn.00421cc0
add esp, 0xc
test eax, eax
jne 0x4125e1
push edi
call fcn.0041171d
mov esi, eax
cmp esi, ebx
pop ecx
jne 0x412526
push dword [ebp - 4]
jmp 0x412671
push 0x77
call fcn.00411871
cmp eax, dword [0x45947c]
pop ecx
ja 0x41251e
cmp byte [esi + 0xc], 0
jne 0x41254d
push 0x77
push dword [esi + 4]
call fcn.00411838
cmp eax, 1
pop ecx
pop ecx
jg 0x41251e
mov edi, dword [esi + 4]
push edi
mov byte [esi + 0xc], 1
mov byte [esi + 0xd], 0x77
call fcn.00411905
cmp eax, ebx
pop ecx
je 0x41257c
cmp byte [eax + 9], 0
je 0x412583
push ebx
push 2
push 0x42a914
push dword [esi + 8]
call dword [0x42a344]
jmp 0x41251e
push edi
call fcn.004119a6
pop ecx
mov byte [eax + 9], 1
mov dword [eax + 4], esi
mov ecx, dword [0x459720]
xor edx, edx
cmp ecx, ebx
jbe 0x4125cc
mov esi, dword [ebp - 4]
cmp dword [edx*4 + 0x459724], esi
je 0x4125be
inc edx
cmp edx, ecx
jb 0x412596
jmp 0x4125cc
mov ecx, dword [edx*4 + 0x459728]
mov dword [edx*4 + 0x459724], ecx
mov ecx, dword [0x459720]
inc edx
lea esi, [ecx - 1]
cmp edx, esi
jb 0x4125a9
dec ecx
mov dword [0x459720], ecx
push ebx
push ebx
push eax
push 0x412123
push ebx
push ebx
call dword [0x42a058]
jmp 0x412677
lea eax, [ebp - 0x1174]
push 0x42a90c
push eax
call fcn.00413761
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x412670
lea eax, [ebp - 0x1174]
push eax
call dword [0x42a214]
cmp eax, 5
jle 0x412670
push edi
call fcn.0041171d
cmp eax, ebx
pop ecx
je 0x412670
add esi, 4
push esi
push eax
mov byte [eax + 0xd], 0x68
call fcn.00411df7
sub eax, ebx
pop ecx
pop ecx
je 0x412670
dec eax
dec eax
jne 0x412677
mov eax, dword [0x459720]
xor ecx, ecx
cmp eax, ebx
jbe 0x412677
mov edx, dword [ebp - 4]
cmp dword [ecx*4 + 0x459724], edx
je 0x412661
inc ecx
cmp ecx, eax
jb 0x41263a
jmp 0x412677
mov eax, dword [ecx*4 + 0x459728]
mov dword [ecx*4 + 0x459724], eax
mov eax, dword [0x459720]
inc ecx
lea edx, [eax - 1]
cmp ecx, edx
jb 0x41264d
dec eax
mov dword [0x459720], eax
jmp 0x412677
push edi
call fcn.004121cc
pop ecx
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jbe 0x412366
cmp byte [0x4594f0], 0
je 0x412328
mov edi, dword [ebp - 0xc]
xor esi, esi
push edi
call dword [0x458c90]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret
mov edi, dword [ebp - 0xc]
push 0xfffffffffffffffb
pop esi
jmp 0x412698