Function at 0x401508
Capabilities:
Create thread

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x2e0
mov eax, dword [0x403020]
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp + 0x6c], eax
push 0x7f
xor eax, eax
mov word [ebp - 0x218], bx
pop ecx
lea edi, [ebp - 0x216]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor edi, edi
inc edi
cmp dword [0x403034], ebx
mov dword [ebp - 0x248], edi
mov dword [ebp - 0x240], ebx
mov dword [ebp - 0x244], ebx
mov dword [ebp - 0x21c], ebx
jl 0x401ac3
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push eax
push 0x40120c
lea eax, [ebp - 0x18]
push 0x41
push eax
call dword [sym.imp.msvcrt.dll__snwprintf]
lea eax, [ebp - 0x18]
push eax
push 2
mov word [ebp + 0x68], bx
call dword [sym.imp.msvcrt.dll__wsetlocale]
add esp, 0x18
test eax, eax
je 0x4015ca
push ebx
call sub.KERNEL32.dll_SetThreadUILanguage
push 0x100
lea eax, [ebp - 0x218]
push eax
mov esi, 0x106
push esi
call sub.COMRes.dll_COMResModuleInstance
push eax
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jne 0x4015d1
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4011d4
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
mov eax, edi
jmp 0x401cf9
cmp dword [ebp + 0x78], edi
jle 0x401630
mov eax, dword [ebp + 0x7c]
mov esi, dword [eax + edi*4]
cmp byte [esi], 0x2f
jne 0x40161b
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4015e6
sub eax, edx
cmp eax, 2
jne 0x40163b
mov al, byte [esi + 1]
cmp al, 0x4e
je 0x401613
cmp al, 0x56
je 0x401607
cmp al, 0x6e
je 0x401613
cmp al, 0x76
jne 0x40163b
mov dword [ebp - 0x244], 0x10
jmp 0x401621
mov dword [ebp - 0x248], ebx
jmp 0x401621
inc dword [ebp - 0x21c]
inc edi
cmp edi, dword [ebp + 0x78]
jl 0x4015d6
cmp dword [ebp - 0x21c], 2
jge 0x401662
push ebx
push ebx
push ebx
push ebx
push 0x105
jmp 0x40164f
mov eax, dword [ebp + 0x7c]
push ebx
push ebx
push ebx
push dword [eax + edi*4]
call fcn.004012f3
push eax
push 0x104
call fcn.00401338
push ebx
push ebx
push ebx
push ebx
push 0xfd
jmp 0x401b29
mov eax, dword [ebp - 0x21c]
shl eax, 2
push eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, ebx
pop ecx
mov dword [ebp - 0x234], eax
jne 0x401686
push 0x8007000e
jmp 0x401b15
xor edi, edi
mov dword [ebp - 0x21c], edi
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x230], 1
mov eax, dword [ebp + 0x7c]
mov ecx, dword [ebp - 0x230]
lea eax, [eax + ecx*4]
mov dword [ebp - 0x220], eax
mov eax, dword [eax]
cmp byte [eax], 0x2f
je 0x40171d
push eax
call fcn.004012f3
xor esi, esi
cmp edi, ebx
mov dword [ebp - 0x23c], eax
jle 0x4016ef
mov eax, dword [ebp - 0x234]
push dword [eax + esi*4]
push dword [ebp - 0x23c]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4016e7
inc esi
cmp esi, edi
jl 0x4016c9
cmp esi, edi
jl 0x401a6f
mov eax, dword [ebp - 0x220]
push dword [eax]
call fcn.004012f3
cmp edi, ebx
mov ecx, dword [ebp - 0x234]
mov dword [ecx + edi*4], eax
jle 0x401716
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add dword [ebp - 0x224], eax
inc edi
mov dword [ebp - 0x21c], edi
inc dword [ebp - 0x230]
mov eax, dword [ebp - 0x230]
cmp eax, dword [ebp + 0x78]
jl 0x40169e
cmp dword [ebp - 0x248], ebx
je 0x40182e
mov eax, dword [ebp - 0x21c]
mov ecx, dword [ebp - 0x224]
add ecx, eax
shl ecx, 1
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
cmp edi, ebx
pop ecx
mov dword [ebp - 0x220], edi
je 0x40167c
xor esi, esi
inc esi
cmp dword [ebp - 0x21c], esi
mov word [edi], bx
jle 0x40179d
cmp esi, 1
jle 0x401784
push 0x401208
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov eax, dword [ebp - 0x234]
push dword [eax + esi*4]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
inc esi
cmp esi, dword [ebp - 0x21c]
jl 0x401773
mov eax, dword [ebp - 0x234]
push ebx
push ebx
push dword [eax]
push dword [ebp - 0x220]
push 0xfe
call fcn.00401338
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
mov esi, eax
inc esi
lea edi, [esi + esi]
mov eax, edi
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00401fd0
mov ecx, edi
mov edx, ecx
shr ecx, 2
mov edi, esp
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
mov dword [ebp - 0x224], esp
rep stosb byte es:[edi], al
push dword [sym.imp.msvcrt.dll__iob]
push esi
push dword [ebp - 0x224]
call dword [sym.imp.msvcrt.dll_fgetws]
push dword [ebp - 0x220]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 0x10
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x401ab5
mov esi, dword [ebp - 0x21c]
dec esi
mov edi, esi
shl edi, 4
push edi
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, ebx
pop ecx
mov dword [ebp - 0x238], eax
je 0x40167c
mov ecx, edi
mov edi, dword [ebp - 0x238]
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
mov edi, esi
shl edi, 2
push edi
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, ebx
pop ecx
mov dword [ebp - 0x224], eax
je 0x40167c
mov ecx, edi
mov edi, dword [ebp - 0x224]
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
lea eax, [ebp - 0x22c]
push eax
push 0x40112c
push 1
push ebx
push 0x40113c
mov dword [ebp - 0x24c], ebx
mov dword [ebp - 0x22c], ebx
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, ebx
jl 0x401b14
mov edi, dword [ebp - 0x234]
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax]
lea edx, [ebp - 0x270]
push edx
push dword [edi]
push eax
call dword [ecx + 0x3c]
cmp eax, ebx
jl 0x401b14
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax]
lea edx, [ebp - 0x264]
push edx
push dword [edi]
push eax
call dword [ecx + 0x40]
cmp eax, ebx
jl 0x401b14
mov eax, dword [ebp - 0x244]
or eax, 0x20
cmp dword [ebp - 0x270], 0xb
mov dword [ebp - 0x228], eax
jl 0x401aca
xor eax, eax
inc eax
cmp dword [ebp - 0x21c], eax
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x230], eax
jle 0x401ae5
mov esi, dword [ebp - 0x238]
add esi, 8
mov dword [ebp - 0x23c], esi
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax]
lea edx, [ebp - 0x26c]
push edx
mov edx, dword [ebp - 0x230]
push dword [edi + edx*4]
push eax
call dword [ecx + 0x3c]
cmp eax, ebx
jl 0x401b14
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax]
lea edx, [ebp - 0x268]
push edx
mov edx, dword [ebp - 0x230]
push dword [edi + edx*4]
push eax
call dword [ecx + 0x40]
cmp eax, ebx
jl 0x401b14
cmp dword [ebp - 0x26c], 0xb
jge 0x4019a8
or dword [esi], 0x40
or dword [ebp - 0x228], 0x40
cmp dword [ebp - 0x268], ebx
jne 0x401a8b
cmp dword [ebp - 0x264], ebx
je 0x401a8b
cmp dword [ebp - 0x248], ebx
je 0x401a6a
cmp dword [ebp - 0x220], ebx
jne 0x401a6a
push ebx
push ebx
push ebx
push ebx
push 0xef
call fcn.00401338
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
mov esi, eax
inc esi
lea edi, [esi + esi]
mov eax, edi
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00401fd0
mov ecx, edi
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, esp
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
mov dword [ebp - 0x220], esp
rep stosb byte es:[edi], al
call dword [sym.imp.msvcrt.dll__flushall]
push dword [sym.imp.msvcrt.dll__iob]
push esi
push dword [ebp - 0x220]
call dword [sym.imp.msvcrt.dll_fgetws]
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x220]
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x401ab5
mov esi, dword [ebp - 0x23c]
mov edi, dword [ebp - 0x234]
mov dword [ebp - 0x220], 1
or dword [esi], 0x20
jmp 0x401a92
cmp esi, ebx
push ebx
push ebx
push ebx
push ebx
jne 0x401a81
push 0x102
jmp 0x40164f
push 0x103
jmp 0x40164f
and dword [ebp - 0x228], 0xffffffdf
inc dword [ebp - 0x230]
mov eax, dword [ebp - 0x230]
add esi, 0x10
cmp eax, dword [ebp - 0x21c]
mov dword [ebp - 0x23c], esi
jl 0x40194d
jmp 0x401ae5
push ebx
push ebx
push ebx
push ebx
push 0xff
call fcn.00401338
xor eax, eax
jmp 0x401cf9
cmp dword [ebp - 0x21c], 1
jle 0x401ae5
mov eax, dword [ebp - 0x238]
add eax, 8
or dword [eax], 0x20
add eax, 0x10
dec esi
jne 0x401adc
push dword [ebp - 0x228]
mov eax, dword [ebp - 0x22c]
push dword [edi]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x1c]
cmp eax, ebx
jl 0x401b14
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax]
lea edx, [ebp - 0x24c]
push edx
push eax
call dword [ecx + 0x34]
cmp eax, ebx
jge 0x401b36
push eax
lea ecx, [ebp - 0x260]
call fcn.004012d0
push ebx
push ebx
push ebx
push eax
push 0x100
call fcn.00401338
xor eax, eax
inc eax
jmp 0x401cf9
push ebx
push ebx
push ebx
push dword [ebp - 0x24c]
push 0x101
call fcn.00401338
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
cmp eax, ebx
mov dword [ebp - 0x228], eax
jl 0x401c5c
xor esi, esi
inc esi
cmp dword [ebp - 0x21c], esi
jle 0x401bd3
mov eax, dword [ebp - 0x224]
mov edi, dword [ebp - 0x238]
mov dword [ebp - 0x220], eax
add edi, 8
mov ecx, dword [ebp - 0x234]
mov edx, dword [ecx]
lea eax, [edi - 8]
mov dword [eax], edx
mov edx, dword [ebp - 0x244]
or dword [edi], edx
mov ecx, dword [ecx + esi*4]
mov dword [edi - 4], ecx
lea ecx, [ebp - 0x23c]
push ecx
push ebx
push eax
push 0x401467
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
mov ecx, dword [ebp - 0x220]
mov dword [ecx], eax
je 0x401c0f
add dword [ebp - 0x220], 4
inc esi
add edi, 0x10
cmp esi, dword [ebp - 0x21c]
jl 0x401b83
mov esi, dword [ebp - 0x21c]
push 0xffffffffffffffff
xor edi, edi
inc edi
push edi
push dword [ebp - 0x224]
lea eax, [esi - 1]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
lea eax, [esi - 1]
xor edx, edx
cmp eax, ebx
jle 0x401c33
mov ecx, dword [ebp - 0x238]
add ecx, 0xc
cmp dword [ecx], ebx
jl 0x401c2d
inc edx
add ecx, 0x10
cmp edx, eax
jl 0x401c01
jmp 0x401c33
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x401c1f
call esi
jmp 0x401c3f
call esi
and eax, 0xffff
or eax, 0x80070000
jmp 0x401c3f
mov dword [ebp - 0x240], edi
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x30]
cmp eax, ebx
mov dword [ebp - 0x228], eax
jl 0x401c5c
cmp dword [ebp - 0x240], ebx
jne 0x401c5c
push ebx
push ebx
push ebx
push ebx
push 0xfc
jmp 0x401c65
push ebx
push ebx
push ebx
push ebx
push 0xfb
call fcn.00401338
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
xor esi, esi
cmp dword [ebp - 0x21c], ebx
jle 0x401c8e
mov eax, dword [ebp - 0x234]
push dword [eax + esi*4]
call edi
inc esi
cmp esi, dword [ebp - 0x21c]
jl 0x401c7a
mov eax, dword [ebp - 0x21c]
xor esi, esi
dec eax
cmp eax, ebx
mov dword [ebp - 0x240], eax
jle 0x401cbe
mov eax, dword [ebp - 0x224]
mov eax, dword [eax + esi*4]
cmp eax, ebx
je 0x401cb5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, dword [ebp - 0x240]
jl 0x401ca1
push dword [ebp - 0x224]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
push dword [ebp - 0x238]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
pop ecx
push dword [ebp - 0x24c]
call edi
mov eax, dword [ebp - 0x22c]
cmp eax, ebx
je 0x401cee
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x228]
and eax, 0xffff
lea esp, [ebp - 0x27c]
mov ecx, dword [ebp + 0x6c]
call fcn.00401d95
pop edi
pop esi
pop ebx
add ebp, 0x70
leave
ret