Function at 0x1005405
Capabilities:
Terminate process

Disassembly:
sub esp, 0x81c
or dword [esp + 4], 0xffffffff
push ebx
push ebp
push esi
xor esi, esi
push edi
push esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
call fcn.01002a5c
movzx eax, ax
mov dword [0x10083c0], eax
call fcn.01002b86
call fcn.01001e58
call fcn.01001c39
mov ebp, dword [esp + 0x834]
mov eax, dword [ebp]
add ebp, 4
dec dword [esp + 0x830]
cmp dword [esp + 0x830], esi
mov dword [0x10083b8], eax
jle 0x10058df
xor esi, esi
cmp dword [0x1008020], 6
mov dword [esp + 0x24], esi
mov dword [esp + 0x10], esi
je 0x100587b
xor edi, edi
cmp dword [esp + 0x24], edi
jne 0x10058a6
push edi
push dword [ebp]
lea eax, [esi + 0x1008008]
push eax
call fcn.010019fd
test eax, eax
je 0x1005860
cmp dword [esi + 0x1008038], edi
je 0x10054ca
push dword [ebp]
xor eax, eax
mov ax, word [0x100839c]
push dword [esi + 0x1008014]
push 0x226
push eax
call fcn.01003273
add esp, 0x10
inc edi
mov dword [esp + 0x20], edi
jmp 0x10054cd
xor edi, edi
inc edi
push dword [ebp]
call fcn.010019c0
test eax, eax
jne 0x10054ea
mov eax, dword [esi + 0x1008024]
test al, 0x20
jne 0x10054ea
test eax, 0x100000
je 0x10054f4
add ebp, 4
dec dword [esp + 0x830]
mov dword [esp + 0x24], edi
mov dword [esi + 0x1008038], edi
mov edi, dword [esi + 0x1008020]
cmp edi, 9
ja case.0x100550d.6
jmp dword [edi*4 + 0x1005a92]
xor eax, eax
inc eax
mov dword [esi + 0x1008028], eax
mov dword [esp + 0x1c], eax
jmp case.0x100550d.6
mov eax, dword [esi + 0x1008028]
or dword [esi + 0x1008024], 4
mov dword [section..data], eax
cmp dword [esp + 0x830], 0
jle 0x1005820
mov edi, dword [ebp]
push edi
call fcn.010019c0
test eax, eax
jne 0x1005820
push 0x7fffffff
lea eax, [esp + 0x2c]
push eax
push edi
call fcn.01001b16
test eax, eax
jne 0x1005577
mov eax, dword [esp + 0x28]
mov dword [esi + 0x1008028], eax
jmp 0x100557e
or byte [esi + 0x1008027], 2
cmp dword [esi + 0x1008020], 4
jne 0x1005592
mov eax, dword [esi + 0x1008028]
mov dword [section..data], eax
add ebp, 4
dec dword [esp + 0x830]
jmp case.0x100550d.6
xor ecx, ecx
lea eax, [esi + 0x1008028]
cmp dword [eax], ecx
sete cl
mov dword [eax], ecx
jmp case.0x100550d.6
cmp dword [esp + 0x830], 0
jle 0x1005697
mov edi, dword [ebp]
push edi
mov dword [esp + 0x1c], edi
call fcn.010019c0
test eax, eax
jne 0x1005697
push edi
call fcn.01001aa7
test eax, eax
jne 0x1005628
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea edi, [eax + eax + 4]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
test edx, edx
lea ebx, [esi + 0x1008028]
mov dword [ebx], edx
je 0x100567e
push dword [esp + 0x18]
mov ecx, edi
mov edi, edx
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
push dword [ebx]
jmp 0x100564b
push 4
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
lea ebx, [esi + 0x1008028]
mov dword [ebx], eax
je 0x100567e
push 0x1001214
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
jmp 0x100567e
mov edi, dword [ebp]
push edi
call fcn.010019c0
test eax, eax
jne case.0x100550d.6
test byte [esi + 0x1008025], 4
je 0x1005675
push edi
call fcn.01001abf
push dword [ebp]
push ebx
call fcn.01002698
add ebp, 4
dec dword [esp + 0x830]
cmp dword [esp + 0x830], 0
jg 0x1005655
jmp case.0x100550d.6
mov eax, dword [esi + 0x1008024]
test al, 4
jne 0x10056ae
cmp dword [esi + 0x100803c], 0
je 0x1005833
or eax, 0x1000000
jmp 0x1005838
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], eax
xor ebx, ebx
cmp dword [esp + 0x830], ebx
jle 0x1005723
mov edi, dword [ebp]
push edi
call fcn.010019c0
test eax, eax
jne 0x1005723
test byte [esi + 0x1008025], 4
je 0x10056e7
push edi
call fcn.01001abf
push dword [ebp]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea eax, [eax + eax + 4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [esi + 0x1008028], eax
je 0x1005592
push dword [ebp]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
jmp 0x1005592
mov eax, dword [esi + 0x1008024]
test al, 4
jne 0x10056ae
cmp dword [esi + 0x100803c], ebx
jne 0x10056ae
test eax, 0x10000
jmp 0x1005831
cmp dword [esp + 0x830], 0
jle 0x1005820
push dword [ebp]
call fcn.010019c0
test eax, eax
jne 0x1005820
mov eax, dword [ebp]
xor ebx, ebx
add ebp, 4
dec dword [esp + 0x830]
cmp edi, 9
mov dword [esp + 0x18], eax
jne 0x10057e2
cmp dword [esp + 0x830], ebx
jle 0x10057e2
mov edi, dword [ebp]
push edi
call fcn.010019c0
test eax, eax
jne 0x10057e2
push edi
mov edi, dword [sym.imp.msvcrt.dll_wcslen]
call edi
push dword [esp + 0x1c]
mov ebx, eax
call edi
pop ecx
add ebx, eax
pop ecx
lea eax, [ebx + ebx + 4]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x10057d8
push dword [ebp]
push dword [esp + 0x1c]
push 0x10017a4
push ebx
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0x10
mov dword [esp + 0x18], ebx
add ebp, 4
dec dword [esp + 0x830]
xor eax, eax
cmp dword [esi + 0x1008020], 9
sete al
push eax
lea eax, [esi + 0x1008028]
push eax
push dword [esp + 0x20]
call fcn.01003fd3
test eax, eax
je 0x100580a
or byte [esi + 0x1008027], 2
test ebx, ebx
je case.0x100550d.6
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp case.0x100550d.6
mov eax, dword [esi + 0x1008024]
test al, 4
jne case.0x100550d.6
cmp dword [esi + 0x100803c], 0
jne case.0x100550d.6
or eax, 0x2000000
mov dword [esi + 0x1008024], eax
test byte [esi + 0x1008024], 0x40
je 0x1005860
xor eax, eax
cmp dword [esi + 0x1008020], 5
sete al
push eax
lea eax, [esi + 0x1008028]
push eax
call fcn.010027f4
inc dword [esp + 0x10]
add esi, 0x40
cmp dword [esi + 0x1008020], 6
jne 0x1005478
cmp dword [esp + 0x24], 0
jne 0x10058a6
push dword [ebp]
xor eax, eax
mov ax, word [0x100839c]
push 0x228
push eax
call fcn.01003273
add esp, 0xc
add ebp, 4
dec dword [esp + 0x830]
mov dword [esp + 0x20], 1
cmp dword [esp + 0x830], 0
jg 0x1005461
cmp dword [esp + 0x14], 0
jl 0x10058df
mov eax, dword [esp + 0x14]
shl eax, 6
cmp dword [eax + 0x1008020], 7
jne 0x10058df
cmp dword [eax + 0x1008038], 0
je 0x10058df
push dword [eax + 0x1008028]
call fcn.010046a4
xor ebx, ebx
cmp dword [0x1008020], 6
mov dword [esp + 0x10], ebx
je 0x1005a1a
mov ebp, dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, 0x1008020
mov esi, 0x1008028
cmp dword [esp + 0x1c], ebx
jne 0x100591a
cmp dword [esi + 0x10], ebx
je 0x100591a
mov eax, dword [esi + 0x1c]
cmp eax, ebx
je 0x100591a
push dword [esp + 0x10]
call eax
mov edi, dword [edi]
cmp edi, 2
je 0x100592f
cmp edi, 5
je 0x100592f
cmp edi, 7
jne 0x1005a07
cmp dword [esi + 0x10], ebx
je 0x100593e
test byte [esi - 1], 1
je 0x1005a07
and byte [esi - 1], 0xfe
test byte [esi - 2], 2
je 0x10059aa
push 0x400
lea eax, [esp + 0x30]
push eax
push dword [esi]
push ebx
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [esp + 0x2c]
push eax
call fcn.01001aa7
test eax, eax
jne 0x1005a63
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea ebx, [eax + eax + 4]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebp
mov edi, eax
test edi, edi
mov dword [esi], edi
je 0x1005a05
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
lea eax, [esp + 0x2c]
push eax
jmp 0x10059fb
mov eax, dword [esi]
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x1005a07
push eax
call fcn.01001aa7
test eax, eax
jne 0x1005a63
push dword [esp + 0x14]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea ebx, [eax + eax + 4]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebp
mov edi, eax
test edi, edi
mov dword [esi], edi
je 0x1005a05
push dword [esp + 0x14]
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
push dword [esi]
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
xor ebx, ebx
inc dword [esp + 0x10]
add esi, 0x40
lea edi, [esi - 8]
cmp dword [edi], 6
jne 0x1005902
cmp dword [esp + 0x1c], ebx
je 0x1005a25
call fcn.01004cbd
cmp dword [section..data], ebx
jl 0x1005a32
call fcn.01004a9e
call fcn.01003902
test eax, eax
jne 0x1005a41
cmp dword [esp + 0x20], ebx
je 0x1005a85
xor eax, eax
mov ax, word [0x100839c]
push 0x238
push eax
call fcn.01003273
pop ecx
pop ecx
call fcn.01001d99
push 0xb
call dword [sym.imp.msvcrt.dll_exit]
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebp
cmp eax, ebx
mov dword [esi], eax
je 0x1005a07
push 0x1001214
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
jmp 0x1005a07
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x81c
ret 8