Function at 0x404d37
Capabilities:
Terminate process

Disassembly:
sub esp, 0x82c
mov eax, dword [0x40e170]
xor eax, esp
mov dword [esp + 0x828], eax
mov eax, dword [esp + 0x834]
or dword [esp + 0xc], 0xffffffff
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push ebp
mov dword [esp + 0x30], eax
mov byte [esp + 0x28], 0
mov byte [esp + 0x1e], 1
mov dword [esp + 0x18], ebp
mov byte [esp + 0x1f], 1
mov byte [esp + 0x17], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [0x42e1d0], eax
call fcn.00408817
or dword [0x42e1c4], 0xffffffff
mov esi, 0x10000
push esi
push ebp
push 0x41e1c0
mov byte [0x42e1cc], 0
mov byte [0x42e1cd], 1
mov byte [0x42e1cb], 0
mov byte [0x42e1ca], 0
mov byte [0x42e1c9], 0
call sub.MSVCR80.dll_memset
push esi
push ebp
push 0x40e1c0
call sub.MSVCR80.dll_memset
mov ebx, dword [sym.imp.MSVCR80.dll__wcsicmp]
xor edx, edx
inc edx
add esp, 0x18
cmp dword [esp + 0x840], edx
mov dword [0x40e1b8], ebp
mov dword [esp + 0x20], edx
jle 0x4051c9
mov eax, dword [esp + 0x2c]
mov edi, dword [sym.imp.MSVCR80.dll__wcsnicmp]
lea esi, [eax + edx*4]
mov eax, dword [esi]
movzx ecx, word [eax]
cmp cx, 0x2f
je 0x404e1b
cmp cx, 0x2d
je 0x404e1b
mov dword [esp + 0x1c], edx
jmp 0x4051b3
push 0x4015f8
push eax
call ebx
test eax, eax
pop ecx
pop ecx
je 0x4052a9
push 0x4015f0
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x4052a9
push 0x4015e0
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x4051ae
push 0x4015d0
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x4051ae
push 0x4015c0
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x4051a7
push 0x4015b0
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x4051a7
push 0x4015a8
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x4051a0
push 0x4015a0
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x4051a0
push 0x401598
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x405199
push 0x401590
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x405199
push 0x40157c
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x405192
push 0x401568
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x405192
push 0x401558
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x405189
push 0x401548
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x405189
push 0x401534
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x405180
push 0x401520
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x405180
push 0x401510
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x405177
push 0x401500
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x405177
push 6
push 0x4014f0
push dword [esi]
call edi
add esp, 0xc
test eax, eax
je 0x405135
push 6
push 0x4014e0
push dword [esi]
call edi
add esp, 0xc
test eax, eax
je 0x405135
push 7
push 0x4014d0
push dword [esi]
call edi
add esp, 0xc
test eax, eax
je 0x404fd8
push 7
push 0x4014c0
push dword [esi]
call edi
add esp, 0xc
test eax, eax
je 0x404fd8
push dword [esi]
push 0x190
call fcn.00403e72
pop ecx
pop ecx
mov byte [esp + 0x13], 1
jmp 0x4051b3
mov eax, dword [esi]
push 0x3d
push eax
call dword [sym.imp.MSVCR80.dll_wcschr]
cmp eax, ebp
pop ecx
pop ecx
je 0x4051b3
cmp word [eax + 2], 0x40
mov edi, eax
jne 0x4050f6
lea edi, [eax + 4]
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bp
jne 0x405002
sub eax, edx
sar eax, 1
je 0x404fc0
push 0x4014b8
push edi
call fcn.00403823
mov ebp, eax
test ebp, ebp
je 0x4050e2
push ebp
call dword [sym.imp.MSVCR80.dll_feof]
test eax, eax
pop ecx
jne 0x4050d3
lea ebx, [esp + 0x38]
dec ebx
mov esi, 0x800
push esi
lea eax, [esp + 0x3c]
push 0
push eax
call sub.MSVCR80.dll_memset
push ebp
lea eax, [esp + 0x48]
push esi
push eax
call dword [sym.imp.MSVCR80.dll_fgets]
add esp, 0x18
mov esi, ebx
lea edi, [esi + 1]
push 0x2c
push edi
call dword [sym.imp.MSVCR80.dll_strchr]
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x405077
mov byte [esi], 0
push edi
call dword [sym.imp.MSVCR80.dll_atoi]
test eax, eax
pop ecx
mov dword [esp + 0x30], eax
jne 0x4050a3
lea eax, [esp + 0x30]
push eax
push 0x4014b4
push edi
call dword [sym.imp.MSVCR80.dll_sscanf_s]
mov eax, dword [esp + 0x3c]
add esp, 0xc
test eax, eax
je 0x4050bf
mov ecx, dword [0x40e1b8]
cmp ecx, 0x4000
jae 0x4050bf
mov dword [ecx*4 + 0x40e1c0], eax
inc ecx
mov dword [0x40e1b8], ecx
test esi, esi
jne 0x405060
push ebp
call dword [sym.imp.MSVCR80.dll_feof]
test eax, eax
pop ecx
je 0x40503c
push ebp
call dword [sym.imp.MSVCR80.dll_fclose]
mov ebx, dword [sym.imp.MSVCR80.dll__wcsicmp]
jmp 0x4050ee
push edi
push 0x186
call fcn.00403e72
pop ecx
pop ecx
xor ebp, ebp
jmp 0x4051b3
lea esi, [edi + 2]
push 0x2c
push esi
call dword [sym.imp.MSVCR80.dll_wcschr]
mov edi, eax
cmp edi, ebp
pop ecx
pop ecx
je 0x40510d
mov word [edi], bp
mov eax, dword [0x40e1b8]
inc dword [0x40e1b8]
lea eax, [eax*4 + 0x40e1c0]
push eax
push 0x4014ac
push esi
call dword [sym.imp.MSVCR80.dll_swscanf_s]
add esp, 0xc
cmp edi, ebp
jne 0x4050f6
jmp 0x4051b3
mov dword [0x42e1c4], 1
mov esi, dword [esi]
push 0x3d
push esi
call dword [sym.imp.MSVCR80.dll_wcschr]
cmp eax, ebp
pop ecx
pop ecx
je 0x4051b3
lea ecx, [esp + 0x28]
push ecx
add eax, 2
push 0x4014a4
push eax
call dword [sym.imp.MSVCR80.dll_swscanf_s]
mov eax, dword [esp + 0x34]
add esp, 0xc
cmp eax, 1
jle 0x4051b3
mov dword [0x42e1c4], eax
jmp 0x4051b3
mov byte [0x42e1c9], 1
jmp 0x4051b3
mov byte [0x42e1ca], 1
jmp 0x4051b3
mov byte [0x42e1cb], 1
jmp 0x4051b3
or dword [esp + 0x14], 8
jmp 0x4051b3
or dword [esp + 0x14], 2
jmp 0x4051b3
or dword [esp + 0x14], 5
jmp 0x4051b3
mov byte [esp + 0x1a], 0
jmp 0x4051b3
mov byte [esp + 0x24], 1
mov edx, dword [esp + 0x20]
inc edx
cmp edx, dword [esp + 0x840]
mov dword [esp + 0x20], edx
jl 0x404df4
test byte [esp + 0x14], 7
jne 0x4051d5
or dword [esp + 0x14], 3
mov eax, dword [esp + 0x14]
and eax, 2
mov dword [esp + 0x20], eax
jne 0x4051f0
mov byte [0x42e1cc], 0
mov byte [0x42e1cd], 0
cmp byte [esp + 0x24], 0
jne 0x405203
cmp byte [esp + 0x1a], 0
je 0x405203
call fcn.00404cfb
cmp dword [esp + 0x840], 2
jl 0x405333
cmp dword [esp + 0x1c], 1
jl 0x405333
cmp byte [esp + 0x13], 0
jne 0x405333
mov edi, dword [sym.imp.MSVCR80.dll___iob_func]
call edi
mov ebp, dword [sym.imp.MSVCR80.dll_fflush]
add eax, 0x20
push eax
call ebp
test byte [esp + 0x18], 1
pop ecx
je 0x405306
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x2c]
lea eax, [eax + ecx*4]
mov ecx, dword [eax]
mov dword [esp + 0x28], eax
mov eax, ecx
lea edx, [eax + 2]
mov si, word [eax]
inc eax
inc eax
test si, si
jne 0x40525d
sub eax, edx
sar eax, 1
cmp eax, 0xc
jb 0x405306
mov eax, ecx
lea esi, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x405279
sub eax, esi
sar eax, 1
add eax, 0xfffffff4
je 0x4052d7
lea esi, [ecx + eax*2]
movzx edx, word [esi - 2]
cmp dx, 0x2e
je 0x4052ba
cmp dx, 0x5c
je 0x4052ba
cmp dx, 0x2f
je 0x4052ba
xor bl, bl
jmp 0x4052be
call fcn.00404cfb
call fcn.00404c3c
push ebp
call dword [sym.imp.MSVCR80.dll_exit]
mov bl, byte [esp + 0x1b]
cmp dx, 0x2e
jne 0x4052cb
cmp eax, 1
je 0x4052cb
xor bl, bl
test bl, bl
mov ecx, esi
je 0x405306
mov ebx, dword [sym.imp.MSVCR80.dll__wcsicmp]
push 0x401488
push ecx
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x405306
mov eax, dword [esp + 0x28]
push dword [eax]
push 0x19a
call fcn.00403e72
cmp dword [esp + 0x28], 0
pop ecx
pop ecx
je 0x40532f
mov dword [esp + 0x14], 2
call edi
add eax, 0x20
push eax
call ebp
mov eax, dword [esp + 0x30]
pop ecx
push dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push dword [esp + 0x18]
push dword [eax + ecx*4]
call fcn.00404611
test al, al
je 0x40532f
push 0
jmp 0x4052b4
push 1
jmp 0x4052b4
call fcn.00404c3c
xor eax, eax
cmp dword [esp + 0x840], 2
setge al
push eax
jmp 0x4052b4