Function at 0x10046510
Capabilities:
Create thread
Terminate thread

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x10073289
push eax
mov dword fs:[0], esp
sub esp, 0x6c
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
push 1
push 0
push 0
lea eax, [esp + 0x6c]
push 0
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
mov ecx, dword [esi + 0x288]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0
push 0
lea edx, [esp + 0x68]
push 0
push edx
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x10046c90
xor edi, edi
mov eax, dword [esp + 0x64]
cmp eax, 0x12
je 0x10046c90
cmp eax, dword [esi + 0x28c]
je 0x100465a1
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea ecx, [esp + 0x60]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp case.default.0x100465b1
mov edx, dword [esp + 0x68]
lea eax, [edx - 1]
cmp eax, 5
ja case.default.0x100465b1
jmp dword [eax*4 + 0x10046cac]
mov eax, dword [esp + 0x6c]
mov ecx, esi
push eax
call fcn.10046d50
mov ebx, eax
mov dword [esp + 0x14], ebx
mov eax, dword [ebx + 4]
cmp eax, edi
jne 0x100465d6
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea ecx, [esi + 0x58]
push ecx
push 0x5431
push eax
mov ecx, esi
call fcn.1004ad50
mov ebp, eax
mov eax, dword [esi + 0x294]
cmp ebp, edi
jle 0x100466ce
cmp eax, edi
je 0x100466f3
lea ecx, [esp + 0x20]
call fcn.1004c100
lea edx, [ebp + ebp*4]
mov dword [esp + 0x84], 0
lea eax, [edx*8 + 0xc]
push eax
mov dword [esp + 0x28], eax
call fcn.1003bfe0
mov ecx, dword [esp + 0x28]
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x24], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edx, dword [esp + 0x20]
lea eax, [ebp + ebp*4]
xor edi, edi
lea ecx, [eax*8 + 4]
mov word [edx + 6], cx
mov ecx, dword [esp + 0x20]
test ebp, ebp
lea eax, [ecx + 8]
mov dword [ecx], 0x5431
mov ecx, dword [esp + 0x20]
mov word [ecx + 4], 0x65
mov dword [eax], ebp
jle 0x100466a0
lea ebx, [eax + 4]
mov eax, dword [esi + 0x5c]
mov eax, dword [eax + edi*4]
mov eax, dword [eax + 4]
test eax, eax
jne 0x1004668c
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
inc edi
add ebx, 0x28
cmp edi, ebp
jl 0x1004667a
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
mov eax, dword [esi + 0x294]
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x24]
lea ecx, [esp + 0x20]
mov dword [esp + 0x84], 0xffffffff
call fcn.10054960
xor edi, edi
jmp 0x100466f3
cmp eax, edi
je 0x100466f3
lea ecx, [esp + 0x30]
mov dword [esp + 0x30], 0x5432
mov word [esp + 0x34], 0x64
mov word [esp + 0x36], di
mov edx, dword [eax]
push 8
push ecx
push eax
call dword [edx + 0x24]
cmp ebx, edi
je case.default.0x100465b1
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebx
jmp 0x10046c70
mov edx, dword [esp + 0x6c]
mov ecx, esi
push edx
call fcn.10046d50
mov edi, eax
lea eax, [esi + 0x58]
push eax
push 0x5431
push edi
mov ecx, esi
call fcn.1004ac10
test al, al
je 0x10046738
mov dword [esi + 0x290], 1
mov eax, dword [esi + 0x294]
test eax, eax
je 0x10046765
lea edx, [esp + 0x38]
mov dword [esp + 0x38], 0x5432
mov word [esp + 0x3c], 0x64
mov word [esp + 0x3e], 0
mov ecx, dword [eax]
push 8
push edx
push eax
call dword [ecx + 0x24]
push edi
jmp 0x10046c70
mov eax, dword [esp + 0x6c]
mov ecx, esi
push eax
call fcn.10046d50
mov dword [esp + 0x14], eax
mov eax, dword [eax + 4]
cmp eax, edi
jne 0x10046787
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea ebx, [esi + 0x58]
mov ecx, esi
push ebx
push 0x5432
push eax
call fcn.1004ad50
mov ebp, eax
xor edi, edi
cmp ebp, edi
jle 0x10046899
cmp dword [esi + 0x294], edi
je 0x100469a3
lea ecx, [esp + 0x28]
call fcn.1004c100
lea ecx, [ebp + ebp*4]
mov dword [esp + 0x84], 1
lea eax, [ecx*8 + 0xc]
push eax
mov dword [esp + 0x30], eax
call fcn.1003bfe0
mov ecx, dword [esp + 0x30]
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x2c], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edx, dword [esp + 0x28]
lea eax, [ebp + ebp*4]
lea ecx, [eax*8 + 4]
mov word [edx + 6], cx
mov eax, dword [esp + 0x28]
lea ecx, [eax + 8]
mov dword [eax], 0x5432
mov eax, dword [esp + 0x28]
mov word [eax + 4], 0x65
mov dword [ecx], ebp
mov eax, dword [ebx + 4]
test eax, eax
jne 0x1004682d
xor ebx, ebx
jmp 0x10046835
mov ebx, dword [ebx + 8]
sub ebx, eax
sar ebx, 2
sub ebx, ebp
test ebp, ebp
jle 0x10046868
lea edi, [ebx*4]
lea ebx, [ecx + 4]
mov eax, dword [esi + 0x5c]
mov eax, dword [edi + eax]
mov eax, dword [eax + 4]
test eax, eax
jne 0x10046857
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 4
add ebx, 0x28
dec ebp
jne 0x10046845
mov edx, dword [esp + 0x2c]
mov eax, dword [esi + 0x294]
push edx
mov edx, dword [esp + 0x2c]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x24]
lea ecx, [esp + 0x28]
mov dword [esp + 0x84], 0xffffffff
call fcn.10054960
xor edi, edi
jmp 0x100469a3
cmp dword [esi + 0x48], edi
je 0x100469a3
cmp dword [esi + 0x4c], edi
je 0x100469a3
mov eax, dword [ebx + 4]
cmp eax, edi
je 0x100469a3
mov ecx, dword [ebx + 8]
sub ecx, eax
test ecx, 0xfffffffc
jle 0x100469a3
mov dl, byte [esp + 0x13]
mov dword [esp + 0x44], edi
mov byte [esp + 0x40], dl
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x84], 2
xor ebp, ebp
mov ecx, dword [ebx + 4]
cmp ecx, edi
jne 0x100468f3
xor eax, eax
jmp 0x100468fb
mov eax, dword [ebx + 8]
sub eax, ecx
sar eax, 2
cmp ebp, eax
jge 0x1004691c
mov eax, dword [esi + 0x5c]
mov edx, dword [esp + 0x48]
mov ecx, dword [eax + ebp*4]
add ecx, 0x74
push ecx
push 1
push edx
lea ecx, [esp + 0x4c]
call fcn.1004cde0
inc ebp
jmp 0x100468e8
mov eax, dword [esi + 0x290]
mov edx, dword [esi + 0x4c]
lea ecx, [esp + 0x40]
push eax
push ecx
push edx
call dword [esi + 0x48]
mov eax, dword [esp + 0x50]
add esp, 0xc
cmp eax, edi
je 0x1004695c
mov ecx, dword [esp + 0x48]
sub ecx, eax
mov eax, 0x38e38e39
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
test edx, edx
jle 0x1004695c
mov ecx, esi
call fcn.1004c1d0
mov ecx, esi
call fcn.1004c920
mov eax, dword [esp + 0x48]
mov ebx, dword [esp + 0x44]
cmp ebx, eax
mov dword [esp + 0x84], 0xffffffff
mov ebp, eax
je 0x1004698e
mov ecx, ebx
call fcn.10046cd0
add ebx, 0x24
cmp ebx, ebp
jne 0x1004697c
mov ebx, dword [esp + 0x44]
push ebx
call fcn.1003c010
add esp, 4
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
mov eax, dword [esp + 0x14]
cmp eax, edi
je case.default.0x100465b1
mov edi, eax
xor ebx, ebx
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x100469e4
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x100469db
cmp al, 0xff
je 0x100469db
dec al
push edi
mov byte [ecx], al
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
jmp 0x10046c70
push ecx
call fcn.1003c010
add esp, 4
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
push edi
jmp 0x10046c70
mov ecx, dword [esp + 0x6c]
push ecx
mov ecx, esi
call fcn.10046d50
lea ebp, [esi + 0x58]
mov ebx, eax
push ebp
push 0x5432
push ebx
mov ecx, esi
mov dword [esp + 0x24], ebx
call fcn.1004ac10
cmp dword [esi + 0x48], edi
je 0x10046b31
cmp dword [esi + 0x4c], edi
je 0x10046b31
mov dl, byte [esp + 0x13]
xor ebx, ebx
mov byte [esp + 0x50], dl
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x84], 3
xor edi, edi
mov ecx, dword [ebp + 4]
cmp ecx, ebx
jne 0x10046a56
xor eax, eax
jmp 0x10046a5e
mov eax, dword [ebp + 8]
sub eax, ecx
sar eax, 2
cmp edi, eax
jge 0x10046a7f
mov eax, dword [esi + 0x5c]
mov edx, dword [esp + 0x58]
mov ecx, dword [eax + edi*4]
add ecx, 0x74
push ecx
push 1
push edx
lea ecx, [esp + 0x5c]
call fcn.1004cde0
inc edi
jmp 0x10046a4b
mov eax, dword [esi + 0x290]
mov edx, dword [esi + 0x4c]
lea ecx, [esp + 0x50]
push eax
push ecx
push edx
call dword [esi + 0x48]
mov eax, dword [esp + 0x60]
add esp, 0xc
cmp eax, ebx
je 0x10046abf
mov ecx, dword [esp + 0x58]
sub ecx, eax
mov eax, 0x38e38e39
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
test edx, edx
jle 0x10046abf
mov ecx, esi
call fcn.1004c1d0
mov ecx, esi
call fcn.1004c920
mov ebp, dword [esp + 0x58]
mov edi, dword [esp + 0x54]
or ebx, 0xffffffff
cmp edi, ebp
mov dword [esp + 0x84], ebx
mov dword [esp + 0x14], edi
je 0x10046b16
push 1
lea ecx, [edi + 0x10]
mov dword [esp + 0x88], 4
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
mov ecx, edi
mov dword [esp + 0x88], ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
add edi, 0x24
cmp edi, ebp
mov dword [esp + 0x14], edi
jne 0x10046ae0
mov edi, dword [esp + 0x54]
push edi
call fcn.1003c010
mov ebx, dword [esp + 0x1c]
add esp, 4
xor eax, eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
push ebx
jmp 0x10046c70
mov ecx, dword [esp + 0x6c]
push ecx
mov ecx, esi
call fcn.10046d50
mov edx, dword [eax]
push eax
mov dword [esi + 0x278], edx
call fcn.1003c010
mov eax, dword [esi + 0x26c]
add esp, 4
cmp eax, edi
mov byte [esi + 0x270], 1
je 0x10046baa
push 0x7d0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x10046b97
mov eax, dword [esi + 0x26c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
lea edi, [esi + 0x50]
mov ecx, edi
call fcn.1004d3c0
mov ecx, edi
call fcn.1004d380
xor edi, edi
mov ecx, dword [esi + 0x26c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x26c], edi
mov eax, dword [esi + 0x26c]
mov byte [esi + 0x270], 0
cmp eax, edi
jne case.default.0x100465b1
lea edx, [esp + 0x1c]
push edx
push edi
push esi
push 0x10046e00
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x26c], eax
jmp case.default.0x100465b1
mov eax, dword [esp + 0x6c]
mov ecx, esi
push eax
call fcn.10046d50
mov edx, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov ebp, eax
mov ecx, edx
mov eax, dword [ebp + 4]
cmp eax, edi
je 0x10046bfd
mov ecx, eax
mov eax, dword [esi + 0x27c]
mov ebx, dword [esi + 0x5c]
mov eax, dword [ebx + eax*4]
add eax, 0x10
mov eax, dword [eax + 4]
cmp eax, edi
jne 0x10046c15
mov eax, edx
push ecx
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x10046c3e
lea edi, [esi + 0x50]
mov ecx, edi
call fcn.1004d330
mov ecx, edi
mov dword [esi + 0x40], 2
call fcn.1004d380
xor edi, edi
cmp ebp, edi
je case.default.0x100465b1
mov eax, dword [ebp + 4]
cmp eax, edi
je 0x10046c66
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x10046c5d
cmp al, 0xff
je 0x10046c5d
dec al
mov byte [ecx], al
jmp 0x10046c66
push ecx
call fcn.1003c010
add esp, 4
mov dword [ebp + 4], edi
mov dword [ebp + 8], edi
mov dword [ebp + 0xc], edi
push ebp
call fcn.1003c010
add esp, 4
xor edi, edi
lea ecx, [esp + 0x60]
push edi
push edi
push edi
push ecx
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
jne 0x10046571
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [esp + 0x7c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x78
ret