Function at 0x405890
Capabilities:
Accept command line arguments

Disassembly:
push 0xffffffffffffffff
push 0x40c7db
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x38
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov esi, dword [0x411534]
mov ebx, eax
push 0x4108c8
mov dword [esp + 0x14], ebx
call esi
push ebx
call esi
push 0x4108c4
call esi
push ebx
call dword [sym.imp.MSVCRT.dll_wcslen]
mov ebp, dword [esp + 0x5c]
add esp, 4
cmp word [ebx], 0
mov dword [esp + 0x14], eax
mov edi, ebx
mov esi, ebx
je 0x405b0b
mov ax, word [esi]
cmp ax, 0x22
jne 0x4059b7
mov ax, word [esi + 2]
add esi, 2
test ax, ax
je 0x405b0b
cmp ax, 0x22
je 0x405923
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x40590c
jmp 0x405b0b
cmp word [esi], 0
je 0x405b0b
push edi
mov word [esi], 0
call dword [0x41154c]
cmp eax, 1
jle 0x405a56
mov al, byte [esp + 0x58]
push 0
lea ecx, [esp + 0x1c]
lea ebp, [edi + 2]
mov byte [esp + 0x1c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push ebp
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov edi, eax
lea ecx, [esp + 0x18]
push 1
push edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x405990
mov ecx, dword [esp + 0x1c]
push edi
push ebp
push ecx
call fcn.00405630
add esp, 0xc
lea ecx, [esp + 0x18]
push edi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Eos_unsigned_int_]
mov ebp, dword [esp + 0x58]
lea edx, [esp + 0x18]
push edx
push 1
mov eax, dword [ebp + 8]
mov ecx, ebp
push eax
mov dword [esp + 0x5c], 0
call fcn.00405e40
lea ecx, [esp + 0x18]
jmp 0x405a42
cmp ax, 0x20
jne 0x405a6f
push edi
mov word [esi], 0
call dword [0x41154c]
test eax, eax
jle 0x405a56
mov al, byte [esp + 0x58]
push 0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x2c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push edi
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov ebp, eax
lea ecx, [esp + 0x28]
push 1
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x405a20
mov ecx, dword [esp + 0x2c]
push ebp
push edi
push ecx
call fcn.00405630
add esp, 0xc
lea ecx, [esp + 0x28]
push ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Eos_unsigned_int_]
mov ebp, dword [esp + 0x58]
lea edx, [esp + 0x28]
push edx
push 1
mov eax, dword [ebp + 8]
mov ecx, ebp
push eax
mov dword [esp + 0x5c], 1
call fcn.00405e40
lea ecx, [esp + 0x28]
push 1
mov dword [esp + 0x54], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ebx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, esi
sub eax, ebx
sar eax, 1
cmp eax, ecx
jae 0x405b0b
add esi, 2
mov edi, esi
jmp 0x405a78
add esi, 2
cmp word [esi], 0
je 0x405a87
cmp word [esi], 0
jne 0x4058ef
jmp 0x405b0b
push edi
call dword [0x41154c]
test eax, eax
jle 0x405b0b
mov cl, byte [esp + 0x58]
push 0
mov byte [esp + 0x3c], cl
lea ecx, [esp + 0x3c]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push edi
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov esi, eax
lea ecx, [esp + 0x38]
push 1
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x405add
mov edx, dword [esp + 0x3c]
push esi
push edi
push edx
call fcn.00405630
add esp, 0xc
lea ecx, [esp + 0x38]
push esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Eos_unsigned_int_]
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x38]
push ecx
push 1
push eax
mov ecx, ebp
mov dword [esp + 0x5c], 2
call fcn.00405e40
push 1
lea ecx, [esp + 0x3c]
mov dword [esp + 0x54], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ebx, dword [ebp + 4]
test ebx, ebx
je 0x405b8e
mov edi, dword [ebp + 8]
mov edx, edi
sub edx, ebx
sar edx, 4
mov dword [esp + 0x58], edx
je 0x405b8e
lea esi, [ebx + 0x10]
cmp esi, edi
je 0x405b46
sub ebx, esi
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov ecx, dword [eax]
push ecx
push 0
push esi
lea ecx, [ebx + esi]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
add esi, 0x10
cmp esi, edi
jne 0x405b2b
mov edi, dword [ebp + 8]
lea esi, [edi - 0x10]
cmp esi, edi
je 0x405b8a
xor ecx, ecx
mov eax, dword [esi + 4]
cmp eax, ecx
je 0x405b78
mov cl, byte [eax - 1]
test cl, cl
je 0x405b6c
cmp cl, 0xff
je 0x405b6c
dec cl
mov byte [eax - 1], cl
jmp 0x405b78
add eax, 0xfffffffe
push eax
call fcn.00409f4c
add esp, 4
xor ecx, ecx
mov dword [esi + 4], ecx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], ecx
add esi, 0x10
cmp esi, edi
jne 0x405b52
add dword [ebp + 8], 0xfffffff0
mov ecx, dword [esp + 0x48]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x44
ret