Function at 0x1005508
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.0100280c
movzx eax, ax
mov dword [0x1007400], eax
call fcn.01002936
call fcn.01001c08
call fcn.010019e9
mov ebp, dword [esp + 0x834]
mov eax, dword [ebp]
add ebp, 4
dec dword [esp + 0x830]
cmp dword [esp + 0x830], esi
mov dword [0x10073f8], eax
jle 0x10059e2
xor esi, esi
cmp dword [0x1007020], 6
mov dword [esp + 0x24], esi
mov dword [esp + 0x10], esi
je 0x100597e
xor edi, edi
cmp dword [esp + 0x24], edi
jne 0x10059a9
push edi
push dword [ebp]
lea eax, [esi + 0x1007008]
push eax
call fcn.010017ad
test eax, eax
je 0x1005963
cmp dword [esi + 0x1007038], edi
je 0x10055cd
push dword [ebp]
xor eax, eax
mov ax, word [0x10073dc]
push dword [esi + 0x1007014]
push 0x226
push eax
call fcn.01002e99
add esp, 0x10
inc edi
mov dword [esp + 0x20], edi
jmp 0x10055d0
xor edi, edi
inc edi
push dword [ebp]
call fcn.01001770
test eax, eax
jne 0x10055ed
mov eax, dword [esi + 0x1007024]
test al, 0x20
jne 0x10055ed
test eax, 0x100000
je 0x10055f7
add ebp, 4
dec dword [esp + 0x830]
mov dword [esp + 0x24], edi
mov dword [esi + 0x1007038], edi
mov edi, dword [esi + 0x1007020]
cmp edi, 9
ja case.0x1005610.6
jmp dword [edi*4 + 0x1005b95]
xor eax, eax
inc eax
mov dword [esi + 0x1007028], eax
mov dword [esp + 0x1c], eax
jmp case.0x1005610.6
mov eax, dword [esi + 0x1007028]
or dword [esi + 0x1007024], 4
mov dword [section..data], eax
cmp dword [esp + 0x830], 0
jle 0x1005923
mov edi, dword [ebp]
push edi
call fcn.01001770
test eax, eax
jne 0x1005923
push 0x7fffffff
lea eax, [esp + 0x2c]
push eax
push edi
call fcn.010018c6
test eax, eax
jne 0x100567a
mov eax, dword [esp + 0x28]
mov dword [esi + 0x1007028], eax
jmp 0x1005681
or byte [esi + 0x1007027], 2
cmp dword [esi + 0x1007020], 4
jne 0x1005695
mov eax, dword [esi + 0x1007028]
mov dword [section..data], eax
add ebp, 4
dec dword [esp + 0x830]
jmp case.0x1005610.6
xor ecx, ecx
lea eax, [esi + 0x1007028]
cmp dword [eax], ecx
sete cl
mov dword [eax], ecx
jmp case.0x1005610.6
cmp dword [esp + 0x830], 0
jle 0x100579a
mov edi, dword [ebp]
push edi
mov dword [esp + 0x1c], edi
call fcn.01001770
test eax, eax
jne 0x100579a
push edi
call fcn.01001857
test eax, eax
jne 0x100572b
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 + 0x1007028]
mov dword [ebx], edx
je 0x1005781
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 0x100574e
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 + 0x1007028]
mov dword [ebx], eax
je 0x1005781
push 0x10011c4
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
jmp 0x1005781
mov edi, dword [ebp]
push edi
call fcn.01001770
test eax, eax
jne case.0x1005610.6
test byte [esi + 0x1007025], 4
je 0x1005778
push edi
call fcn.0100186f
push dword [ebp]
push ebx
call fcn.01002448
add ebp, 4
dec dword [esp + 0x830]
cmp dword [esp + 0x830], 0
jg 0x1005758
jmp case.0x1005610.6
mov eax, dword [esi + 0x1007024]
test al, 4
jne 0x10057b1
cmp dword [esi + 0x100703c], 0
je 0x1005936
or eax, 0x1000000
jmp 0x100593b
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], eax
xor ebx, ebx
cmp dword [esp + 0x830], ebx
jle 0x1005826
mov edi, dword [ebp]
push edi
call fcn.01001770
test eax, eax
jne 0x1005826
test byte [esi + 0x1007025], 4
je 0x10057ea
push edi
call fcn.0100186f
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 + 0x1007028], eax
je 0x1005695
push dword [ebp]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
jmp 0x1005695
mov eax, dword [esi + 0x1007024]
test al, 4
jne 0x10057b1
cmp dword [esi + 0x100703c], ebx
jne 0x10057b1
test eax, 0x10000
jmp 0x1005934
cmp dword [esp + 0x830], 0
jle 0x1005923
push dword [ebp]
call fcn.01001770
test eax, eax
jne 0x1005923
mov eax, dword [ebp]
xor ebx, ebx
add ebp, 4
dec dword [esp + 0x830]
cmp edi, 9
mov dword [esp + 0x18], eax
jne 0x10058e5
cmp dword [esp + 0x830], ebx
jle 0x10058e5
mov edi, dword [ebp]
push edi
call fcn.01001770
test eax, eax
jne 0x10058e5
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 0x10058db
push dword [ebp]
push dword [esp + 0x1c]
push 0x1001704
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 + 0x1007020], 9
sete al
push eax
lea eax, [esi + 0x1007028]
push eax
push dword [esp + 0x20]
call fcn.01003bf9
test eax, eax
je 0x100590d
or byte [esi + 0x1007027], 2
test ebx, ebx
je case.0x1005610.6
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp case.0x1005610.6
mov eax, dword [esi + 0x1007024]
test al, 4
jne case.0x1005610.6
cmp dword [esi + 0x100703c], 0
jne case.0x1005610.6
or eax, 0x2000000
mov dword [esi + 0x1007024], eax
test byte [esi + 0x1007024], 0x40
je 0x1005963
xor eax, eax
cmp dword [esi + 0x1007020], 5
sete al
push eax
lea eax, [esi + 0x1007028]
push eax
call fcn.010025a4
inc dword [esp + 0x10]
add esi, 0x40
cmp dword [esi + 0x1007020], 6
jne 0x100557b
cmp dword [esp + 0x24], 0
jne 0x10059a9
push dword [ebp]
xor eax, eax
mov ax, word [0x10073dc]
push 0x228
push eax
call fcn.01002e99
add esp, 0xc
add ebp, 4
dec dword [esp + 0x830]
mov dword [esp + 0x20], 1
cmp dword [esp + 0x830], 0
jg 0x1005564
cmp dword [esp + 0x14], 0
jl 0x10059e2
mov eax, dword [esp + 0x14]
shl eax, 6
cmp dword [eax + 0x1007020], 7
jne 0x10059e2
cmp dword [eax + 0x1007038], 0
je 0x10059e2
push dword [eax + 0x1007028]
call fcn.010047a7
xor ebx, ebx
cmp dword [0x1007020], 6
mov dword [esp + 0x10], ebx
je 0x1005b1d
mov ebp, dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, 0x1007020
mov esi, 0x1007028
cmp dword [esp + 0x1c], ebx
jne 0x1005a1d
cmp dword [esi + 0x10], ebx
je 0x1005a1d
mov eax, dword [esi + 0x1c]
cmp eax, ebx
je 0x1005a1d
push dword [esp + 0x10]
call eax
mov edi, dword [edi]
cmp edi, 2
je 0x1005a32
cmp edi, 5
je 0x1005a32
cmp edi, 7
jne 0x1005b0a
cmp dword [esi + 0x10], ebx
je 0x1005a41
test byte [esi - 1], 1
je 0x1005b0a
and byte [esi - 1], 0xfe
test byte [esi - 2], 2
je 0x1005aad
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.01001857
test eax, eax
jne 0x1005b66
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 0x1005b08
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 0x1005afe
mov eax, dword [esi]
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x1005b0a
push eax
call fcn.01001857
test eax, eax
jne 0x1005b66
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 0x1005b08
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 0x1005a05
cmp dword [esp + 0x1c], ebx
je 0x1005b28
call fcn.01004dc0
cmp dword [section..data], ebx
jl 0x1005b35
call fcn.01004ba1
call fcn.01003528
test eax, eax
jne 0x1005b44
cmp dword [esp + 0x20], ebx
je 0x1005b88
xor eax, eax
mov ax, word [0x10073dc]
push 0x238
push eax
call fcn.01002e99
pop ecx
pop ecx
call fcn.01001b49
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 0x1005b0a
push 0x10011c4
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
jmp 0x1005b0a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x81c
ret 8