Function at 0x1004cbd
Capabilities:
Terminate process

Disassembly:
sub esp, 0x2c
mov eax, dword [0x1008020]
push ebx
push ebp
xor ebp, ebp
xor edx, edx
and byte [esp + 0xb], dl
cmp eax, 6
push esi
push edi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], 1
mov dword [esp + 0x18], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x2c], ebp
je 0x1004d8b
mov esi, eax
mov eax, 0x1008024
mov ebx, dword [eax - 0x14]
test ebx, 0xff0000
je 0x1004d26
test byte [eax], 0x20
jne 0x1004d26
inc dword [esp + 0x20]
cmp dword [eax + 0x14], ebp
je 0x1004d26
inc dword [esp + 0x1c]
mov ecx, dword [eax]
mov edi, ecx
and edi, 0x20
je 0x1004d39
mov dword [esp + 0x30], 1
xor ebp, ebp
cmp dword [eax + 0x14], ebp
je 0x1004d76
cmp edi, ebp
jne 0x1004d5a
test ecx, 0x100000
jne 0x1004d5a
cmp esi, 3
je 0x1004d76
cmp esi, 4
je 0x1004d76
inc dword [esp + 0x28]
jmp 0x1004d76
mov ecx, dword [eax + 0x1c]
and ecx, 0xffff
or dword [esp + 0x34], ecx
inc edx
cmp ebx, ebp
je 0x1004d76
mov cl, byte [eax - 0x11]
and cl, 0xf
mov byte [esp + 0x13], cl
mov esi, dword [eax + 0x3c]
add eax, 0x40
cmp esi, 6
jne 0x1004d09
cmp dword [esp + 0x28], ebp
jne 0x1004d93
cmp edx, ebp
jne 0x1004d93
mov dword [esp + 0x18], 1
call fcn.010035b8
cmp dword [esp + 0x18], ebp
je 0x1004dca
movsx eax, word [0x10083b4]
push ebp
push eax
push ebp
push ebp
push 0x1f4
call fcn.010032f1
test eax, eax
jne 0x1004dca
mov ax, word [0x1008398]
push 0x10013ac
push eax
call fcn.01003260
pop ecx
pop ecx
xor eax, eax
mov ax, word [0x1008398]
push 0x236
push eax
call fcn.01003273
push dword [0x10083b8]
xor eax, eax
mov ax, word [0x1008398]
mov ebx, 0x1001534
push ebx
push eax
call fcn.01003260
xor edi, edi
add esp, 0x14
cmp dword [esp + 0x30], edi
mov ebp, eax
je 0x1004e5f
cmp dword [esp + 0x18], edi
jne 0x1004e48
cmp dword [0x1008020], 6
je 0x1004e48
mov esi, 0x1008038
test byte [esi - 0x14], 0x20
je 0x1004e3b
cmp dword [esi], 0
je 0x1004e3b
push dword [esi - 0x24]
xor eax, eax
mov ax, word [0x1008398]
push ebx
push eax
call fcn.01003260
add esp, 0xc
add ebp, eax
inc edi
add esi, 0x40
cmp dword [esi - 0x18], 6
jne 0x1004e18
test edi, edi
jne 0x1004e5f
xor eax, eax
mov ax, word [0x1008398]
push 0x230
push eax
call fcn.01003273
pop ecx
pop ecx
add ebp, eax
cmp dword [esp + 0x20], 1
jle 0x1004e84
cmp dword [esp + 0x1c], 0
jne 0x1004e84
xor eax, eax
mov ax, word [0x1008398]
push 0x100179c
push eax
call fcn.01003260
pop ecx
pop ecx
add ebp, eax
and dword [esp + 0x14], 0
cmp dword [0x1008020], 6
je 0x1004fe1
mov esi, 0x1008024
cmp dword [esp + 0x14], 0
jne 0x1004ec8
test byte [esi], 0x30
jne 0x1004fd4
test byte [esi - 0x12], 0xff
je 0x1004fd4
cmp dword [esp + 0x1c], 0
jle 0x1004ee4
cmp dword [esi + 0x14], 0
je 0x1004fd4
jmp 0x1004ee4
mov eax, dword [esi]
test al, 0x30
jne 0x1004fd4
test byte [esi - 0x12], 0xff
jne 0x1004fd4
test al, 1
jne 0x1004fd4
xor eax, eax
cmp dword [esp + 0x24], eax
jne 0x1004f0d
cmp dword [esp + 0x20], eax
je 0x1004f0d
cmp dword [esp + 0x1c], eax
jne 0x1004f0d
mov ax, word [0x1008398]
push 0x1001794
push eax
call fcn.01003260
pop ecx
pop ecx
add ebp, eax
mov ebx, dword [esi]
and dword [esp + 0x24], 0
test bl, 8
je 0x1004f34
push dword [esi - 8]
xor eax, eax
mov ax, word [0x1008398]
push 0x1001534
push eax
call fcn.01003260
add esp, 0xc
jmp 0x1004f91
lea eax, [esi - 0x1c]
push eax
call fcn.01001a8f
test eax, eax
mov edx, 0x10012f4
jne 0x1004f4b
mov edx, 0x1001214
test ebx, 0x10000
mov ecx, 0x1001520
jne 0x1004f5d
mov ecx, 0x1001214
test bl, 0x20
mov eax, dword [0x10083a4]
jne 0x1004f6c
mov eax, dword [0x10083bc]
push dword [esi - 8]
mov ax, word [eax]
push edx
push dword [esi - 0xc]
movzx eax, ax
push ecx
push eax
xor eax, eax
mov ax, word [0x1008398]
push 0x100175c
push eax
call fcn.01003260
add esp, 0x1c
add ebp, eax
movsx eax, word [0x10083b4]
sub eax, 0xf
cmp ebp, eax
jle 0x1004fd4
xor eax, eax
mov ax, word [0x1008398]
push 0x10013ac
push eax
call fcn.01003260
pop ecx
pop ecx
push 0x20
pop edi
xor eax, eax
mov ax, word [0x1008398]
push 0x10012f4
push eax
call fcn.01003260
dec edi
pop ecx
pop ecx
jne 0x1004fb9
push 0x21
pop ebp
add esi, 0x40
cmp dword [esi - 4], 6
jne 0x1004e9b
cmp dword [esp + 0x14], 0
jne 0x100500b
cmp dword [esp + 0x20], 1
jle 0x100500b
cmp dword [esp + 0x1c], 0
jne 0x100500b
xor eax, eax
mov ax, word [0x1008398]
push 0x1001754
push eax
call fcn.01003260
pop ecx
pop ecx
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 2
jl 0x1004e89
xor eax, eax
mov ax, word [0x1008398]
push 0x232
push eax
call fcn.01003273
xor edi, edi
cmp dword [esp + 0x38], edi
pop ecx
pop ecx
je 0x1005132
xor ebx, ebx
inc ebx
cmp dword [0x1008020], 6
je 0x1005132
mov esi, 0x1008018
mov eax, dword [esi + 0xc]
test al, 0x10
je 0x1005060
cmp dword [esi + 0x20], edi
je 0x100510c
test al, 0x20
je 0x100510c
cmp dword [esp + 0x18], edi
jne 0x1005077
cmp dword [esi + 0x20], edi
je 0x100510c
cmp ebx, edi
je 0x1005092
xor eax, eax
mov ax, word [0x1008398]
push 0x231
push eax
call fcn.01003273
pop ecx
pop ecx
xor ebx, ebx
mov eax, dword [esi]
cmp eax, edi
je 0x10050a8
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
test eax, eax
pop ecx
je 0x10050a8
mov eax, dword [esi]
jmp 0x10050ab
mov eax, dword [esi - 4]
test word [esi + 0xc], 0x110
mov ecx, dword [0x10083ac]
jne 0x10050bf
mov ecx, dword [0x1008398]
push dword [esi + 4]
push eax
push dword [0x10083a4]
push 0x100172c
push ecx
call fcn.01003260
mov edi, eax
add esp, 0x14
cmp edi, 0x20
jle 0x10050f5
xor eax, eax
mov ax, word [0x1008398]
push 0x10012f4
push eax
call fcn.01003260
pop ecx
pop ecx
add edi, eax
movsx eax, word [0x10083b4]
push 1
push eax
push 0x20
push edi
push dword [esi - 0x10]
call fcn.010032f1
xor edi, edi
add esi, 0x40
cmp dword [esi + 8], 6
jne 0x1005050
cmp ebx, edi
jne 0x1005132
xor eax, eax
mov ax, word [0x1008398]
push 0x10013ac
push eax
call fcn.01003260
pop ecx
pop ecx
mov dword [esp + 0x14], edi
cmp dword [0x1008020], 6
mov dword [esp + 0x24], 1
je 0x1005338
mov ebp, 0x1008020
mov esi, 0x1008024
cmp dword [esp + 0x14], 0
mov eax, dword [esi]
jne 0x100520b
test al, 8
je 0x1005328
test eax, 0x100020
jne 0x1005328
cmp dword [esp + 0x18], 0
jne 0x1005186
cmp dword [ebp], 3
je 0x1005328
test al, 0x10
je 0x1005194
cmp dword [esi + 0x14], 0
je 0x1005328
cmp dword [esp + 0x18], 0
jne 0x10051bd
cmp dword [esi + 0x14], 0
jne 0x10051bd
mov eax, dword [esi + 0x1c]
and eax, dword [esp + 0x34]
test ax, 0xffff
je 0x1005328
cmp dword [esp + 0x28], 1
jge 0x1005328
mov eax, dword [esi - 0x14]
shr eax, 0x1c
and al, byte [esp + 0x13]
test al, 0xf
jne 0x1005328
xor edi, edi
cmp dword [esp + 0x24], edi
je 0x1005239
mov eax, dword [esp + 0x14]
sub eax, edi
je 0x1005218
dec eax
jne 0x1005235
cmp dword [esp + 0x38], edi
mov eax, 0x10013ac
jne 0x10051f2
mov eax, 0x1001214
push eax
xor eax, eax
mov ax, word [0x1008398]
push 0x234
push eax
call fcn.01003273
add esp, 0xc
jmp 0x1005235
test al, 8
jne 0x1005328
jmp 0x100516a
xor eax, eax
mov ax, word [0x1008398]
push 0x233
push eax
call fcn.01003273
pop ecx
pop ecx
mov dword [esp + 0x38], 1
mov dword [esp + 0x24], edi
mov eax, dword [esi - 0xc]
cmp eax, edi
je 0x1005251
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
test eax, eax
pop ecx
je 0x1005251
xor ebx, ebx
inc ebx
jmp 0x1005253
xor ebx, ebx
mov eax, dword [esi]
test al, 8
je 0x100527c
test ax, 0x110
mov eax, dword [0x10083ac]
jne 0x1005269
mov eax, dword [0x1008398]
push dword [esi - 8]
push 0x1001718
push eax
call fcn.01003260
add esp, 0xc
jmp 0x10052c6
cmp ebx, edi
je 0x1005285
mov ecx, dword [esi - 0xc]
jmp 0x1005288
mov ecx, dword [esi - 0x10]
test eax, 0x10000
mov edx, 0x1001520
jne 0x1005299
mov edx, 0x1001214
test ax, 0x110
mov eax, dword [0x10083ac]
jne 0x10052a9
mov eax, dword [0x1008398]
push dword [esi - 8]
push ecx
mov ecx, dword [0x10083bc]
movzx ecx, word [ecx]
push edx
push ecx
push 0x10016e4
push eax
call fcn.01003260
add esp, 0x18
mov edi, eax
cmp edi, 0x20
jle 0x10052e4
xor eax, eax
mov ax, word [0x1008398]
push 0x10016dc
push eax
call fcn.01003260
pop ecx
pop ecx
add edi, eax
test byte [esi + 2], 1
je 0x1005301
cmp dword [esp + 0x2c], 0
jne 0x1005301
test ebx, ebx
je 0x10052fa
mov eax, dword [esi - 0xc]
jmp 0x10052fd
mov eax, dword [esi - 0x10]
mov dword [esp + 0x2c], eax
movsx eax, word [0x10083b4]
push 1
push eax
push 0x20
push edi
push dword [esi - 0x1c]
call fcn.010032f1
cmp dword [esp + 0x18], 0
jne 0x1005328
cmp dword [ebp], 7
jne 0x1005328
call fcn.010049b3
add esi, 0x40
lea ebp, [esi - 4]
cmp dword [ebp], 6
jne 0x1005155
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 2
jl 0x1005136
mov eax, dword [esp + 0x2c]
xor ebx, ebx
cmp eax, ebx
je 0x1005369
push eax
push eax
xor eax, eax
mov ax, word [0x1008398]
push 0x23d
push eax
call fcn.01003273
add esp, 0x10
cmp dword [esp + 0x18], ebx
je 0x1005384
xor eax, eax
mov ax, word [0x1008398]
push 0x23e
push eax
call fcn.01003273
pop ecx
pop ecx
xor edi, edi
inc edi
cmp dword [0x1008020], 6
je 0x10053e5
mov esi, 0x1008024
cmp dword [esp + 0x18], ebx
jne 0x10053a0
cmp dword [esi + 0x14], ebx
jmp 0x10053ac
cmp dword [esp + 0x30], ebx
je 0x10053ae
test dword [esi], 0x100020
je 0x10053dc
test byte [esi], 0x80
je 0x10053dc
cmp edi, ebx
je 0x10053ce
xor eax, eax
mov ax, word [0x1008398]
push 0x242
push eax
call fcn.01003273
pop ecx
pop ecx
xor edi, edi
push ebx
push 0x50
push 2
push ebx
push dword [esi - 0x18]
call fcn.010032f1
add esi, 0x40
cmp dword [esi - 4], 6
jne 0x1005395
call fcn.01001d99
push ebx
call dword [sym.imp.msvcrt.dll_exit]
pop edi
pop esi
pop ebp
pop ebx