Function at 0x401320
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x11c
mov eax, dword [0x424470]
xor eax, esp
mov dword [esp + 0x118], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
push ebx
mov dword [esp + 0x1c], eax
xor eax, eax
push esi
push edi
mov dword [esp + 0x108], 7
mov dword [esp + 0x104], 0
mov word [esp + 0xf4], ax
cmp word [edx], ax
jne 0x401370
xor ecx, ecx
jmp 0x401384
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401375
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0xfc]
call fcn.00405a60
push 0xffffffffffffffff
sub esp, 8
mov dword [esp + 0x1c], 0x2c
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x100]
push eax
call fcn.00402330
inc eax
lea ecx, [esp + 0xf8]
push eax
lea eax, [esp + 0x114]
push eax
call fcn.00401800
sub esp, 8
lea ecx, [esp + 0x30]
call fcn.00401840
mov edx, str._antihack_
lea ecx, [esp + 0x38]
call fcn.00403340
mov edx, 0x4215c8
mov ecx, eax
call fcn.00403340
mov edx, 0x4215c4
mov ecx, eax
call fcn.00403340
lea edx, [esp + 0x10c]
mov ecx, eax
call fcn.004036c0
lea eax, [esp + 0xdc]
push eax
lea ecx, [esp + 0x2c]
call fcn.00401970
cmp dword [esp + 0xf0], 8
lea esi, [esp + 0xdc]
mov eax, dword [0x426afc]
cmovae esi, dword [esp + 0xdc]
test al, 1
jne 0x401451
or eax, 1
mov dword [0x426afc], eax
call fcn.00402590
push 0x41aa10
call fcn.0040776e
add esp, 4
sub esp, 0x10
mov ecx, 0x426b00
push esi
call fcn.004020f0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea edx, [esp + 0x10]
mov ecx, eax
call fcn.00401080
mov ebx, eax
mov edx, 1
mov eax, dword [esp + 0x10]
cmp eax, edx
jle 0x401621
mov ecx, dword [ebx + edx*4]
cmp word [ecx], 0x2f
jne 0x401496
inc edx
cmp edx, eax
jl 0x401483
jmp 0x401621
cmp edx, eax
jge 0x401621
inc edx
cmp edx, eax
jge 0x401621
mov esi, dword [ebx + edx*4]
inc edx
mov dword [esp + 0x14], esi
cmp word [esi], 0
je 0x401621
cmp edx, eax
jge 0x4014ca
mov esi, dword [ebx + edx*4]
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x14]
jmp 0x4014d2
mov dword [esp + 0x20], 0x421650
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x401621
mov edi, esi
lea ecx, [edi + 2]
lea ebx, [ebx]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x4014f0
sub edi, ecx
lea edx, [esi + 2]
sar edi, 1
lea ecx, [edi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x401505
sub esi, edx
sar esi, 1
inc esi
test ecx, ecx
cmove ecx, esi
push ecx
mov dword [esp + 0x14], ecx
call fcn.004066b1
add esp, 4
mov dword [esp + 0x18], eax
push 0
push 0
push dword [esp + 0x18]
push eax
push esi
push dword [esp + 0x28]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [esp + 0x18]
add eax, edi
mov edi, dword [esp + 0x18]
push edi
push dword [esp + 0x20]
mov dword [esp + 0x18], eax
mov word [eax], 0x57
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor esi, esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], esi
test eax, eax
jne 0x4015a3
mov ecx, dword [esp + 0x10]
push edi
push dword [esp + 0x20]
mov byte [ecx], 0x41
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
mov dword [esp + 0x14], esi
test esi, esi
jne 0x4015a3
mov eax, dword [esp + 0x10]
push edi
push dword [esp + 0x20]
mov byte [eax], 0
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
mov dword [esp + 0x14], eax
push edi
call fcn.00406de4
mov eax, dword [esp + 0x1c]
add esp, 4
test eax, eax
je 0x4015c5
push dword [ebp + 0x14]
push dword [esp + 0x24]
push dword [esp + 0x2c]
push 0
call eax
jmp 0x401617
test esi, esi
je 0x401617
mov esi, dword [esp + 0x20]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4015d0
sub esi, ecx
sar esi, 1
inc esi
push esi
call fcn.004066b1
add esp, 4
mov edi, eax
push 0
push 0
push esi
push edi
push esi
push dword [esp + 0x34]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push dword [ebp + 0x14]
push edi
push dword [esp + 0x2c]
push 0
call dword [esp + 0x24]
push edi
call fcn.00406de4
add esp, 4
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test ebx, ebx
je 0x40162e
push ebx
call fcn.00406de4
add esp, 4
cmp dword [esp + 0xf0], 8
jb 0x401647
push dword [esp + 0xdc]
call fcn.00406743
add esp, 4
xor eax, eax
mov dword [esp + 0xf0], 7
mov word [esp + 0xdc], ax
mov eax, dword [esp + 0x28]
mov dword [esp + 0xec], 0
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x28], vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [esp + ecx + 0x24], eax
test byte [esp + 0x7c], 1
mov dword [esp + 0x40], vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
je 0x4016a1
mov eax, dword [esp + 0x4c]
push dword [eax]
call fcn.00406743
add esp, 4
mov eax, dword [esp + 0x4c]
mov dword [eax], 0
mov eax, dword [esp + 0x5c]
mov dword [eax], 0
mov eax, dword [esp + 0x6c]
mov dword [eax], 0
mov eax, dword [esp + 0x50]
mov dword [eax], 0
mov eax, dword [esp + 0x60]
mov dword [eax], 0
mov eax, dword [esp + 0x70]
mov dword [eax], 0
and dword [esp + 0x7c], 0xfffffffe
mov esi, dword [esp + 0x74]
mov dword [esp + 0x78], 0
mov dword [esp + 0x40], vtable.std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__.0
test esi, esi
je 0x40171a
mov ecx, dword [esi]
test ecx, ecx
je 0x401711
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x401711
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push esi
call fcn.00406743
add esp, 4
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x28], vtable.std::basic_iostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x20]
mov dword [esp + ecx + 0x24], eax
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x38], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [esp + 0x38]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [esp + ecx + 0x34], eax
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x28], vtable.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [esp + ecx + 0x24], eax
lea eax, [esp + 0x90]
push eax
mov dword [esp + 0x94], vtable.std::ios_base.0
call fcn.00405d7e
add esp, 4
cmp dword [esp + 0x120], 8
jb 0x4017a5
push dword [esp + 0x10c]
call fcn.00406743
add esp, 4
xor eax, eax
mov dword [esp + 0x120], 7
cmp dword [esp + 0x108], 8
mov dword [esp + 0x11c], 0
mov word [esp + 0x10c], ax
jb 0x4017de
push dword [esp + 0xf4]
call fcn.00406743
add esp, 4
mov ecx, dword [esp + 0x124]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004066a2
mov esp, ebp
pop ebp
ret 0x10