Function at 0x10046f0
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push esi
push edi
mov eax, dword [0x1009008]
mov esi, 0x1009008
cmp eax, esi
je 0x1004723
test byte [eax + 0x1c], 1
je 0x1004723
push 0x1001704
push 0xc6
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001e7b
mov eax, dword [ebp + 0x24]
xor edi, edi
cmp dword [ebp + 8], 2
mov dword [eax], edi
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x10], edi
mov dword [eax], edi
jge 0x100476e
push edi
push 2
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004766
test byte [eax + 0x1c], 1
je 0x1004766
push 0x57
push 0x1001704
push 0xc7
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001ea2
push 0x57
pop eax
jmp 0x1004bd7
mov eax, dword [ebp + 0xc]
push ebx
xor ebx, ebx
add eax, 4
mov dword [ebp - 0x18], edi
mov dword [ebp - 4], 1
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
cmp dword [ebp - 4], eax
jge 0x1004b85
xor edi, edi
mov dword [ebp - 0xc], edi
cmp dword [0x1009030], edi
je 0x100485f
mov eax, 0x1009030
mov ecx, dword [eax]
mov eax, ecx
lea edx, [eax + 2]
mov dword [ebp - 0x14], edx
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x10047b0
sub eax, dword [ebp - 0x14]
sar eax, 1
push eax
mov eax, dword [ebp - 8]
push ecx
push dword [eax]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x10047e9
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
imul eax, eax, 0xc
lea eax, [eax + 0x1009030]
cmp dword [eax], 0
jne 0x10047a6
jmp 0x100485f
mov ecx, dword [ebp - 0xc]
imul ecx, ecx, 0xc
mov eax, dword [ecx + 0x1009038]
test eax, eax
je 0x1004813
cmp dword [eax], 0
jne 0x1004808
cmp dword [eax + 4], 0
jne 0x1004c22
test eax, eax
je 0x1004813
mov dword [eax + 4], 1
mov eax, dword [ecx + 0x1009030]
lea edi, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x100481c
mov edx, dword [ebp - 8]
mov edx, dword [edx]
sub eax, edi
mov edi, dword [ecx + 0x1009034]
sar eax, 1
lea ebx, [edx + eax*2]
mov eax, dword [ebp + 0x14]
or dword [eax], edi
mov eax, 0x400
cmp edi, eax
jg 0x1004a26
je 0x1004d78
cmp edi, 0x20
jg 0x1004a0e
je 0x1004a09
dec edi
je 0x10049c6
dec edi
je 0x10049a6
dec edi
dec edi
je 0x100491c
sub edi, 4
je 0x10048b2
sub edi, 8
jne 0x1004a5f
mov eax, dword [ebp - 0xc]
imul eax, eax, 0xc
push dword [eax + 0x1009030]
mov eax, dword [ebp - 8]
push dword [eax]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x1004c60
mov eax, dword [ebp + 0x30]
mov dword [eax], 1
jmp 0x1004b73
mov eax, dword [ebp - 0xc]
imul eax, eax, 0xc
push dword [eax + 0x1009030]
mov eax, dword [ebp - 8]
push dword [eax]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x1004c8d
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x1004b73
push 0
push 0xf
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xcd
jmp 0x1004c4d
mov eax, ebx
xor edi, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1004923
sub eax, edx
sar eax, 1
je 0x100495f
movzx eax, word [ebx + edi*2]
push eax
call dword [sym.imp.msvcrt.dll_isdigit]
pop ecx
test eax, eax
je 0x1004cba
mov eax, ebx
inc edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x100494d
sub eax, edx
sar eax, 1
cmp edi, eax
jb 0x1004933
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1004964
mov edi, dword [ebp + 0x20]
sub eax, edx
push edi
sar eax, 1
push 0x10017e8
inc eax
push eax
push ebx
call sub.msvcrt.dll__snwscanf_s
add esp, 0x10
cmp eax, 0xffffffff
je 0x1004ce2
test eax, eax
je 0x1004ce2
mov eax, dword [edi]
imul eax, eax, 0x3e8
mov dword [edi], eax
jmp 0x1004b73
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
push eax
push ebx
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 0x38]
push dword [ebp + 0x34]
call fcn.010042d8
mov dword [ebp - 0x10], eax
jmp 0x1004b73
movzx eax, word [ebx]
test ax, ax
je 0x1004d12
cmp ax, 0x22
jne 0x10049ff
mov ecx, dword [ebp + 0x1c]
lea eax, [ebx + 2]
mov dword [ecx], eax
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10049e5
sub eax, edx
sar eax, 1
xor ecx, ecx
mov word [ebx + eax*2 - 2], cx
jmp 0x1004b73
mov eax, dword [ebp + 0x1c]
mov dword [eax], ebx
jmp 0x1004b73
mov eax, dword [ebp + 0x24]
jmp 0x1004a02
sub edi, 0x40
je 0x1004a21
sub edi, 0x40
jne 0x1004bdd
mov eax, dword [ebp + 0x18]
jmp 0x1004a02
mov eax, dword [ebp + 0x28]
jmp 0x1004a02
mov eax, 0x8000
cmp edi, eax
jle 0x1004da9
cmp edi, 0x10000
je 0x1004b58
cmp edi, 0x20000
je 0x1004b09
cmp edi, 0x40000
je 0x1004ab6
cmp edi, 0x80000
je 0x1004b73
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 4]
mov dword [ecx], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + eax*4]
movzx eax, word [eax]
cmp ax, 0x2d
je 0x1004f17
cmp ax, 0x2f
je 0x1004f17
mov eax, dword [ebp + 0x24]
mov eax, dword [eax]
test eax, eax
je 0x1004ed0
mov ecx, dword [ebp + 0x28]
cmp dword [ecx], 0
jne 0x1004ecc
push dword [ebp + 0x2c]
mov eax, dword [ebp + 0x18]
push ecx
push dword [ebp + 0x24]
push dword [eax]
call fcn.01004568
mov dword [ebp - 0x10], eax
jmp 0x1004ee8
push dword [ecx + 0x1009030]
mov eax, dword [ebp - 8]
push dword [eax]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x1004b73
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
push dword [eax + ecx*4]
push 3
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xd3
jmp 0x1004c4d
push dword [ecx + 0x1009030]
mov eax, dword [ebp - 8]
push dword [eax]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x1004b73
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
push dword [eax + ecx*4]
push 3
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xd2
jmp 0x1004c4d
push dword [ecx + 0x1009030]
mov eax, dword [ebp - 8]
push dword [eax]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x1004fe3
inc dword [ebp - 4]
add dword [ebp - 8], 4
xor edi, edi
cmp dword [ebp - 0x10], edi
je 0x1004784
mov ecx, dword [ebp + 0x24]
mov edx, dword [ebp + 0x28]
xor eax, eax
cmp dword [ecx], edi
setne al
xor ecx, ecx
cmp dword [edx], edi
setne cl
xor eax, ecx
je 0x1004ba5
push edi
push 0x57
call fcn.01002ed7
push edi
push 2
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004bd3
test byte [eax + 0x1c], 1
je 0x1004bd3
push 0x57
push 0x1001704
push 0xdc
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001ea2
push 0x57
pop eax
pop ebx
pop edi
pop esi
leave
ret 0x34
sub edi, 0x80
je 0x1004d43
sub edi, 0x100
jne 0x1004a5f
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
push dword [eax + ecx*4]
push 3
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xd1
jmp 0x1004c4d
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
push dword [eax + ecx*4]
push 6
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xc8
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001ea2
push 0x57
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
push dword [eax + ecx*4]
push 3
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xcf
jmp 0x1004c4d
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
push dword [eax + ecx*4]
push 3
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xcc
jmp 0x1004c4d
push ebx
push 4
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xca
jmp 0x1004c4d
push ebx
push 4
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xcb
jmp 0x1004c4d
push 0
push 9
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xc9
jmp 0x1004c4d
xor edi, edi
push edi
push 1
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004d72
test byte [eax + 0x1c], 1
je 0x1004d72
push edi
push 0x1001704
push 0xd0
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001ea2
push edi
jmp 0x1004c5a
push 0
push 9
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xd4
jmp 0x1004c4d
je 0x1004e9b
cmp edi, 0x800
je 0x1004e6a
cmp edi, 0x1000
je 0x1004e39
cmp edi, 0x2000
je 0x1004e08
cmp edi, 0x4000
jne 0x1004a5f
push 0
push 0xd
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xd8
jmp 0x1004c4d
push 0
push 0xc
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xd7
jmp 0x1004c4d
push 0
push 0xb
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xd6
jmp 0x1004c4d
push 0
push 0xa
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xd5
jmp 0x1004c4d
push 0
push 0xe
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xd9
jmp 0x1004c4d
test eax, eax
jne 0x1004ee8
mov eax, dword [ebp + 0x28]
cmp dword [eax], 0
je 0x1004ee8
push 0
push 0x57
mov dword [ebp - 0x10], 0x57
call fcn.01002ed7
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004f0f
test byte [eax + 0x1c], 1
je 0x1004f0f
push dword [ebp - 0x10]
push 0x1001704
push 0xdb
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001ea2
mov eax, dword [ebp - 0x10]
jmp 0x1004bd6
mov edi, 0x800
xor ecx, ecx
push 2
pop edx
mov eax, edi
mul edx
seto cl
mov ebx, edi
neg ecx
or ecx, eax
push ecx
call fcn.01001bb6
mov edi, eax
pop ecx
test edi, edi
je 0x1004f91
mov dword [ebp + 0xc], ebx
push ebx
push edi
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.USER32.dll_LoadStringW]
push edi
test eax, eax
je 0x1004faa
dec ebx
cmp eax, ebx
jne 0x1004f9c
cmp dword [ebp + 0xc], 0x1800
je 0x1004f9c
call fcn.01001bd1
add dword [ebp + 0xc], 0x400
mov ebx, dword [ebp + 0xc]
xor ecx, ecx
push 2
pop edx
mov eax, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.01001bb6
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x1004f3e
push 0
push 0xe
call fcn.01002ed7
jmp 0x1004fbb
call fcn.01002531
push edi
call fcn.01001bd1
pop ecx
jmp 0x1004fbb
call fcn.01001bd1
mov dword [esp], 0x100178c
call fcn.01002531
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xda
jmp 0x1004c4d
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
push dword [eax + ecx*4]
push 3
call fcn.01003b09
mov eax, dword [0x1009008]
cmp eax, esi
je 0x1004c58
test byte [eax + 0x1c], 1
je 0x1004c58
push 0x57
push 0x1001704
push 0xce
jmp 0x1004c4d