Function at 0x1004ae6
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xd60
mov eax, dword [0x1036a44]
mov ecx, dword [ebp + 8]
or dword [ebp - 0xd40], 0xffffffff
push ebx
push esi
xor esi, esi
cmp ecx, esi
mov dword [ebp - 4], eax
mov eax, 0x800
push edi
mov dword [ebp - 0xd5c], ecx
mov dword [ebp - 0xd44], esi
mov ebx, eax
mov dword [ebp - 0xd3c], esi
mov dword [ebp - 0xd4c], esi
je 0x1004fcd
cmp dword [ebp + 0xc], esi
je 0x1004fcd
cmp dword [ebp + 0x10], esi
je 0x1004fcd
push eax
call fcn.0102ec4e
cmp eax, esi
pop ecx
mov dword [ebp - 0xd48], eax
jne 0x1004a22
mov eax, 0x8007000e
jmp 0x1004fd2
mov edi, dword [ebp - 0xd48]
xor eax, eax
mov ecx, 0x200
rep stosd dword es:[edi], eax
mov edi, 0x208
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.010048de
test eax, eax
mov esi, dword [sym.imp.msvcrt.dll_wcslen]
jne 0x1004a5b
lea eax, [ebp - 0x20c]
push eax
call esi
test eax, eax
pop ecx
jne 0x1004a86
push 0
push 0
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.0102f660
test eax, eax
jne 0x1004fba
lea eax, [ebp - 0x20c]
push eax
call esi
test eax, eax
pop ecx
je 0x1004fba
xor eax, eax
mov ecx, 0x82
lea edi, [ebp - 0x518]
rep stosd dword es:[edi], eax
push 0x1001744
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x518]
push 0x1001738
push eax
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0x10
lea eax, [ebp - 0xd40]
push eax
push 0x180
lea eax, [ebp - 0x518]
push eax
call fcn.0101ee58
test eax, eax
jl 0x1004ca0
xor esi, esi
cmp dword [ebp - 0xd40], esi
je 0x1004ca0
cmp dword [ebp - 0xd40], 0xffffffff
je 0x1004ca0
push dword [ebp - 0xd40]
call fcn.0102f654
test eax, eax
jl 0x1004ca0
push dword [ebp - 0xd40]
call fcn.0101f4b2
or dword [ebp - 0xd40], 0xffffffff
lea eax, [ebp - 0xd40]
push eax
push 0xc0000000
lea eax, [ebp - 0x518]
push eax
call fcn.0101ee58
test eax, eax
jl 0x1004ca0
cmp dword [ebp - 0xd40], esi
je 0x1004ca0
cmp dword [ebp - 0xd40], 0xffffffff
je 0x1004ca0
lea eax, [ebp - 0xd3c]
push eax
push ebx
push dword [ebp - 0xd48]
push esi
push esi
push dword [ebp - 0xd40]
call fcn.0102f648
cmp eax, 0xc0000011
je 0x1004b79
cmp eax, esi
jne 0x1004ca0
cmp eax, esi
mov eax, dword [ebp - 0xd3c]
jne 0x1004b87
cmp eax, ebx
je 0x1004b8e
lea ecx, [ebx - 2]
cmp eax, ecx
jbe 0x1004bc7
push dword [ebp - 0xd48]
call fcn.0102ec42
add ebx, ebx
push ebx
call fcn.0102ec4e
mov edi, eax
cmp edi, esi
pop ecx
pop ecx
mov dword [ebp - 0xd48], edi
je 0x1004fab
mov ecx, ebx
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
jmp 0x1004b4f
mov ecx, dword [ebp - 0xd48]
mov dword [ebp - 0xd60], eax
add eax, ecx
and dword [ebp - 0xd50], 0
lea esi, [eax - 1]
mov dword [ebp - 0xd54], eax
mov dword [ebp - 0xd54], esi
lea eax, [ebp - 0xd38]
push eax
push dword [ebp - 0xd5c]
lea eax, [ebp + 0xc]
push 0
push eax
call fcn.010293f7
test eax, eax
jne 0x1004d16
lea eax, [ebp - 0xd38]
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
test eax, eax
pop ecx
je 0x1004d16
xor eax, eax
mov ecx, 0x82
lea edi, [ebp - 0x928]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0xd38]
push eax
lea eax, [ebp - 0x928]
push 0x1001734
push eax
call dword [sym.imp.msvcrt.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0x928]
test eax, eax
je 0x1004ca0
mov cl, byte [eax]
inc eax
cmp cl, 0x29
jne 0x1004c52
test eax, eax
je 0x1004ca0
mov cl, byte [eax]
inc eax
cmp cl, 0x29
jne 0x1004c5e
test eax, eax
je 0x1004ca0
push eax
push dword [ebp - 0xd48]
call dword [sym.imp.msvcrt.dll_strstr]
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
je 0x1004c97
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1004c86
sub eax, edx
mov dword [ebp - 0xd58], eax
jne 0x1004d03
cmp dword [ebp - 0xd50], 0
jne 0x1004caa
mov dword [ebp - 0xd44], 0x80004005
xor esi, esi
cmp dword [ebp - 0xd40], esi
je 0x1004ccf
cmp dword [ebp - 0xd40], 0xffffffff
je 0x1004ccf
push dword [ebp - 0xd40]
call fcn.0101f4b2
or dword [ebp - 0xd40], 0xffffffff
cmp dword [ebp - 0xd48], esi
je 0x1004ce3
push dword [ebp - 0xd48]
call fcn.0102ec42
pop ecx
cmp dword [ebp - 0xd4c], esi
je 0x1004cf7
push dword [ebp - 0xd4c]
call fcn.0102ec42
pop ecx
mov eax, dword [ebp - 0xd44]
jmp 0x1004fd2
inc ebx
cmp byte [ebx], 0x29
jne 0x1004d02
jmp 0x1004d0b
inc ebx
cmp byte [ebx], 0x28
jne 0x1004d0a
inc ebx
jmp 0x1004e19
mov eax, dword [ebp - 0xd5c]
push dword [eax + 0xa8]
lea eax, [ebp - 0x310]
push reloc.msvcrt.dll__c_exit
push eax
call dword [sym.imp.msvcrt.dll_sprintf]
mov ebx, dword [ebp - 0xd48]
add esp, 0xc
test ebx, ebx
je 0x1004c97
lea eax, [ebp - 0x310]
push eax
push ebx
call dword [sym.imp.msvcrt.dll_strstr]
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
je 0x1004c97
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1004d62
sub eax, edx
mov dword [ebp - 0xd58], eax
je 0x1004c97
cmp ebx, esi
je 0x1004ca0
mov al, byte [ebx]
inc ebx
cmp al, 0x29
jne 0x1004d77
cmp ebx, esi
je 0x1004ca0
mov al, byte [ebx]
inc ebx
cmp al, 0x29
jne 0x1004d86
cmp ebx, esi
je 0x1004ca0
mov al, byte [ebx]
inc ebx
cmp al, 0x29
jne 0x1004d95
cmp ebx, esi
je 0x1004ca0
mov al, byte [ebx]
inc ebx
cmp al, 0x28
jne 0x1004da4
cmp ebx, esi
je 0x1004ca0
push dword [ebp + 0xc]
lea eax, [ebp - 0x720]
push 0x100171c
push eax
call dword [sym.imp.msvcrt.dll_sprintf]
mov cl, byte [ebx]
add esp, 0xc
cmp cl, 0x29
lea eax, [ebp - 0x720]
je 0x1004df7
mov edx, ebx
mov edi, eax
sub edx, edi
cmp cl, byte [eax]
jne 0x1004d3d
inc eax
mov cl, byte [edx + eax]
cmp cl, 0x29
jne 0x1004de6
test ebx, ebx
je 0x1004c97
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1004e04
sub eax, edx
mov dword [ebp - 0xd58], eax
je 0x1004c97
cmp dword [ebp - 0xd4c], 0
je 0x1004e2e
push dword [ebp - 0xd4c]
call fcn.0102ec42
pop ecx
push dword [ebp - 0xd3c]
call fcn.0102ec4e
test eax, eax
pop ecx
mov dword [ebp - 0xd4c], eax
je 0x1004fab
mov ecx, dword [ebp - 0xd3c]
mov edi, dword [ebp - 0xd4c]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
and dword [ebp - 0xd3c], 0
cmp esi, ebx
mov edi, dword [ebp - 0xd4c]
mov eax, ebx
je 0x1004e87
mov cl, byte [eax]
mov byte [edi], cl
inc edi
inc eax
inc dword [ebp - 0xd3c]
cmp eax, esi
jne 0x1004e77
mov al, byte [eax]
mov byte [edi], al
inc dword [ebp - 0xd3c]
mov ecx, dword [ebp - 0xd3c]
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebp + 0x10]
cmp ecx, 0x63
jle 0x1004edd
xor edx, edx
push 0x64
mov eax, ecx
pop edi
div edi
xor edx, edx
push 0xa
pop edi
add al, 0x30
mov byte [ebx], al
inc ebx
movsx eax, byte [ebx]
imul eax, eax, 0x64
sub ecx, eax
mov eax, ecx
div edi
add al, 0x30
mov byte [ebx], al
inc ebx
movsx eax, byte [ebx]
imul eax, eax, 0xfffffff6
add ecx, eax
cmp dword [ebp + 0x10], 9
jle 0x1004ef9
xor edx, edx
push 0xa
mov eax, ecx
pop edi
div edi
add al, 0x30
mov byte [ebx], al
inc ebx
movsx eax, byte [ebx]
imul eax, eax, 0xfffffff6
add ecx, eax
mov eax, dword [ebp - 0xd4c]
add cl, 0x30
mov byte [ebx], cl
inc ebx
cmp dword [ebp + 0xc], 0x63
jle 0x1004f17
add eax, 3
sub dword [ebp - 0xd3c], 3
jmp 0x1004f30
cmp dword [ebp + 0xc], 9
jle 0x1004f29
add eax, 2
sub dword [ebp - 0xd3c], 2
jmp 0x1004f30
inc eax
dec dword [ebp - 0xd3c]
cmp dword [ebp - 0xd3c], 0
je 0x1004f57
mov ecx, dword [ebp - 0xd3c]
mov esi, eax
mov eax, ecx
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0xd54]
push dword [ebp - 0xd60]
xor edi, edi
push dword [ebp - 0xd48]
push edi
push edi
push dword [ebp - 0xd40]
call fcn.0102f63c
test eax, eax
jl 0x1004ca0
cmp dword [ebp - 0xd40], edi
je 0x1004ca0
cmp dword [ebp - 0xd40], 0xffffffff
je 0x1004ca0
inc dword [ebp - 0xd50]
cmp dword [ebp - 0xd50], 2
jl 0x1004beb
jmp 0x1004caa
mov dword [ebp - 0xd44], 0x8007000e
jmp 0x1004caa
push dword [ebp - 0xd48]
call fcn.0102ec42
pop ecx
mov eax, 0x80004005
jmp 0x1004fd2
mov eax, 0x80070057
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0102e95a
leave
ret 0xc