Function at 0x406440
Capabilities:
Create thread

Disassembly:
sub esp, 0x124
push ebx
push ebp
mov ebp, dword [esp + 0x130]
push esi
mov esi, eax
push edi
mov eax, ebp
call fcn.00405eb0
lea edx, [ebp + 4]
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x406461
push 0
push 0
lea ebx, [ebp + 0x104]
push ebx
lea eax, [esp + 0x40]
push eax
lea eax, [ebp + 4]
push eax
call fcn.0045afb6
mov eax, ebx
add esp, 0x14
mov esi, eax
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x406490
lea edi, [esp + 0x34]
sub eax, esi
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x4064a2
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x34]
rep movsb byte es:[edi], byte [esi]
mov edx, ebx
mov ecx, eax
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x4064c4
sub esp, 0x1c
mov ecx, esp
xor ebx, ebx
lea eax, [ebp + 4]
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], ebx
mov dword [esp + 0x2c], esp
mov byte [ecx + 4], bl
lea esi, [eax + 1]
mov edi, edi
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x4064f0
sub eax, esi
push eax
lea edi, [ebp + 4]
push edi
call fcn.00404090
call fcn.0042bc30
add esp, 0x1c
cmp eax, ebx
mov dword [ebp + 0x204], eax
jne 0x406526
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x124
ret 8
lea esi, [ebp + 0xa228]
push esi
mov eax, edi
mov dword [ebp + 0x20c], ebx
call fcn.00449900
add esp, 4
test eax, eax
je 0x406517
or edi, 0xffffffff
push edi
push esi
call dword [0x4ee04c]
push edi
push esi
mov ebx, eax
mov dword [ebp + 0xa648], edi
mov dword [ebp + 0xa64c], edi
call dword [0x4ee050]
mov edi, eax
add esp, 0x10
test edi, edi
je 0x40661c
cmp dword [edi + 8], 0
mov dword [esp + 0x10], 0
jle 0x40661c
mov edx, dword [edi]
mov eax, dword [esp + 0x10]
mov esi, dword [edx + eax*4]
push str.LOOPSTART
push esi
call fcn.0045ad40
add esp, 8
test eax, eax
je 0x4065c9
push 0x497488
push esi
call fcn.0045b000
push 0x49747a
push 0
call fcn.0045b000
add esp, 0x10
test eax, eax
je 0x4065c9
push eax
call fcn.0045ad3a
add esp, 4
mov dword [ebp + 0xa648], eax
push str.LOOPLENGTH
push esi
call fcn.0045ad40
add esp, 8
test eax, eax
je 0x406608
push 0x497488
push esi
call fcn.0045b000
push 0x49747a
push 0
call fcn.0045b000
add esp, 0x10
test eax, eax
je 0x406608
push eax
call fcn.0045ad3a
add esp, 4
mov dword [ebp + 0xa64c], eax
mov eax, dword [esp + 0x10]
add eax, 1
cmp eax, dword [edi + 8]
mov dword [esp + 0x10], eax
jl 0x406581
mov word [esp + 0x20], 1
mov ax, word [ebx + 4]
mov word [esp + 0x22], ax
mov ecx, dword [ebx + 8]
movzx eax, ax
shl eax, 4
cdq
and edx, 7
add eax, edx
sar eax, 3
mov word [esp + 0x2c], ax
movzx eax, ax
mov dword [ebp + 0xa650], eax
mov edx, eax
lea eax, [ebp + 0xa5e8]
imul edx, ecx
mov dword [esp + 0x24], ecx
xor ecx, ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ecx
lea ecx, [esp + 0x20]
xor ebx, ebx
push ebx
mov dword [ebp + 0xa5f8], ecx
mov ecx, dword [esp + 0x140]
lea esi, [ebp + 0xa60c]
push esi
mov dword [eax], 0x24
mov dword [esp + 0x30], edx
mov dword [ebp + 0xa5ec], 0x8188
mov dword [ebp + 0xa5f0], 0x4000
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0xc]
push ecx
mov word [esp + 0x3e], 0x10
call eax
test eax, eax
jl 0x406517
mov eax, dword [esi]
mov ecx, dword [eax]
lea edx, [esp + 0x1c]
push edx
push 0x4944d4
push eax
mov eax, dword [ecx]
call eax
test eax, eax
jl 0x406517
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push ebx
push ebx
push ebx
push ebx
call edi
push ebx
push ebx
push ebx
push ebx
mov dword [ebp + 0xa628], eax
call edi
push ebx
push ebx
push ebx
push ebx
mov dword [ebp + 0xa62c], eax
call edi
mov edx, dword [ebp + 0xa628]
lea ecx, [ebp + 0xa610]
mov dword [ebp + 0xa630], eax
mov dword [ebp + 0xa614], edx
mov edx, dword [ebp + 0xa62c]
mov dword [ebp + 0xa624], eax
mov eax, dword [esp + 0x1c]
push ecx
mov dword [ecx], ebx
mov dword [ebp + 0xa618], 0x2000
mov dword [ebp + 0xa61c], edx
mov dword [ebp + 0xa620], 0xffffffff
mov edx, dword [eax]
push 3
push eax
mov eax, dword [edx + 0xc]
call eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esi]
mov ecx, dword [eax]
push ebx
push ebx
push ebx
lea edx, [esp + 0x20]
push edx
lea edx, [esp + 0x28]
push edx
push 0x4000
push ebx
push eax
mov eax, dword [ecx + 0x2c]
call eax
test eax, eax
jl 0x406517
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
push ecx
push ebx
push edx
call fcn.0045ed30
mov edx, dword [esp + 0x20]
mov eax, dword [esi]
mov ecx, dword [eax]
add esp, 0xc
push ebx
push ebx
push edx
mov edx, dword [esp + 0x24]
push edx
push eax
mov eax, dword [ecx + 0x4c]
call eax
mov eax, dword [esi]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x3c]
push ebx
push eax
call edx
mov eax, dword [esi]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x44]
push ebx
push eax
call edx
mov eax, dword [esi]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x40]
push ebx
push eax
call edx
mov esi, dword [esi]
mov eax, dword [esi]
mov ecx, dword [eax + 0x34]
push ebx
push esi
call ecx
push ebp
push ebx
push 0x406820
mov dword [ebp + 0xa638], ebx
mov dword [ebp + 0xa63c], ebx
call fcn.00459fa7
add esp, 0xc
push 1
push eax
mov dword [ebp + 0xa634], eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
pop edi
pop esi
mov byte [ebp + 0xa641], 1
pop ebp
mov al, 1
pop ebx
add esp, 0x124
ret 8