Function at 0x1005745
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x234
mov eax, dword [0x101100c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
and dword [ebp - 0x210], 0
and dword [ebp - 0x218], 0
mov dword [ebp - 0x230], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x224], eax
mov eax, dword [ebp + 0x20]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp + 0x24]
push esi
mov dword [ebp - 0x220], eax
mov eax, dword [ebp + 0x2c]
push edi
mov dword [ebp - 0x234], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
mov esi, 0x1001628
lea edi, [ebp - 0x20c]
rep movsd dword es:[edi], dword [esi]
push 0x1f4
mov dword [ebp - 0x22c], eax
xor edi, edi
lea eax, [ebp - 0x1f8]
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x214], edi
mov dword [ebp - 0x21c], edi
cmp dword [0x1013d1c], edi
je 0x10059c3
cmp ebx, edi
je 0x10059c3
mov eax, dword [ebp + 0xc]
or dword [ebx + 4], eax
mov eax, dword [ebp - 0x224]
cmp eax, edi
je 0x10058a5
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1005805
sub eax, esi
lea esi, [eax + 1]
lea edi, [esi + esi]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x210], eax
test eax, eax
je 0x1005860
push dword [ebp - 0x224]
push 0x1001998
push esi
push eax
call fcn.010053ad
add esp, 0x10
test eax, eax
jge 0x1005854
mov ecx, dword [ebp - 0x210]
xor eax, eax
mov word [edi + ecx - 2], ax
mov eax, dword [ebp - 0x210]
mov dword [ebp - 0x218], eax
xor edi, edi
cmp dword [ebp - 0x220], edi
je 0x10058b9
push dword [ebp - 0x220]
call fcn.01004c96
cmp eax, edi
je 0x10058ad
push 0x104
lea ecx, [ebp - 0x20c]
push ecx
push eax
call dword [0x1013d90]
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
cmp eax, edi
je 0x10058ad
inc eax
inc eax
jmp 0x10058b3
mov dword [ebp - 0x218], edi
jmp 0x1005862
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x214], eax
mov esi, dword [ebx]
mov eax, 0x65000000
cmp esi, eax
je 0x10058c8
cmp esi, edi
jne 0x1005900
test dword [0x1013d24], 0x80000
je 0x10058ea
xor ecx, ecx
cmp esi, eax
setne cl
dec ecx
and ecx, 0x69000000
add ecx, 0x2000000
mov dword [ebx], ecx
test dword [0x1013d24], 0x40000
je 0x1005900
mov dword [ebp - 0x21c], 1
mov eax, dword [0x1013d1c]
mov esi, dword [eax]
call fcn.01005021
push ecx
push ecx
fstp qword [esp]
push dword [ebp + 0x30]
push dword [ebp - 0x234]
push dword [ebp + 0x28]
push dword [ebp - 0x214]
push str._unknown_
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push dword [0x1013d2c]
push dword [ebx + 8]
push dword [ebx + 4]
push dword [ebp - 0x228]
push edi
push dword [ebp + 0x18]
call fcn.0100566e
push eax
call fcn.0100563c
push eax
push dword [ebx]
push dword [ebp - 0x230]
push 0x11
push dword [0x1013d1c]
call dword [esi + 0x14]
add esp, 0x54
mov esi, eax
cmp dword [ebp - 0x210], edi
je 0x100598b
push dword [ebp - 0x210]
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp esi, 4
jne 0x100599c
call fcn.01005e94
push edi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [ebp - 0x21c], edi
je 0x10059b3
push edi
push edi
push 1
push 0xc0000025
call dword [sym.imp.KERNEL32.dll_RaiseException]
push dword [ebp - 0x22c]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
jmp 0x10059c5
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.010049e5
leave
ret 0x2c