Function at 0x404ff0
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x407109
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.MSVCRT.dll___p___argc]
call dword [sym.imp.MSVCRT.dll___p___argv]
mov eax, dword [eax]
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ebx
mov edi, dword [eax]
mov al, byte [ebp - 0x1d]
mov dword [ebp - 4], ebx
push ebx
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
mov byte [ebp - 0x30], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push edi
call sub.MSVCRT.dll_strlen
add esp, 4
mov esi, eax
lea ecx, [ebp - 0x30]
push 1
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x40507c
mov ecx, dword [ebp - 0x2c]
push esi
push edi
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
lea ecx, [ebp - 0x30]
push esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
push 0x40b198
mov byte [ebp - 4], 2
mov esi, dword [edx]
call sub.MSVCRT.dll_strlen
add esp, 4
lea ecx, [ebp - 0x30]
push eax
push esi
push 0x40b198
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::rfind_char_const___unsigned_int__unsigned_int_const]
mov esi, eax
cmp esi, 0xffffffff
je 0x405112
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edi, dword [eax]
mov eax, dword [ebp - 0x28]
cmp eax, esi
jae 0x4050c0
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xran_void_]
lea ecx, [ebp - 0x30]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Split_void_]
mov eax, dword [ebp - 0x28]
mov ecx, eax
sub ecx, esi
cmp ecx, edi
jae 0x4050d6
mov edi, ecx
cmp edi, ebx
jbe 0x405112
mov edx, dword [ebp - 0x2c]
sub eax, edi
sub eax, esi
lea ecx, [edx + edi]
push eax
add ecx, esi
add esi, edx
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_memmove]
mov esi, dword [ebp - 0x28]
add esp, 0xc
sub esi, edi
lea ecx, [ebp - 0x30]
push ebx
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x405112
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x28], esi
mov byte [ecx + esi], 0
push 0x40b198
call sub.MSVCRT.dll_strlen
add esp, 4
lea ecx, [ebp - 0x30]
push eax
push 0x40b198
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
test eax, eax
jne 0x405ba8
mov ebx, dword [ebp - 0x14]
xor edi, edi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x4c], edi
mov ecx, dword [ebx + 0x18]
mov dword [ebp - 0x44], edi
push ecx
mov dword [ebp - 0x34], edi
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 4
push eax
push edi
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
push 2
push edi
lea edx, [ebp - 0x48]
mov esi, eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push edx
mov dword [ebp - 0x3c], esi
mov byte [ebp - 4], 3
call edi
push eax
mov eax, dword [ebx + 4]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
mov ebx, dword [sym.imp.KERNEL32.dll_DuplicateHandle]
add esp, 4
push eax
push esi
call ebx
test eax, eax
jne 0x4051bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x74]
push 0x4088b0
push ecx
mov dword [ebp - 0x74], eax
call sub.MSVCRT.dll__CxxThrowException
push 2
push 0
lea edx, [ebp - 0x4c]
push 0
push edx
call edi
push eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
push eax
push esi
call ebx
test eax, eax
jne 0x4051f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x68]
push 0x4088b0
push edx
mov dword [ebp - 0x68], eax
call sub.MSVCRT.dll__CxxThrowException
push 2
push 0
lea eax, [ebp - 0x44]
push 0
push eax
call edi
mov ecx, dword [ebp - 0x14]
push eax
mov edx, dword [ecx + 0x10]
push edx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
push eax
push esi
call ebx
test eax, eax
jne 0x405235
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x6c]
push 0x4088b0
push eax
call sub.MSVCRT.dll__CxxThrowException
push 2
push 0
lea ecx, [ebp - 0x34]
push 0
push ecx
call edi
mov edx, dword [ebp - 0x14]
push eax
mov eax, dword [edx + 0x14]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
push eax
push esi
call ebx
test eax, eax
jne 0x4052e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x70]
push 0x4088b0
push ecx
mov dword [ebp - 0x70], eax
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x405287
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
jmp 0x40528d
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x405297
push eax
call esi
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x4052a1
push eax
call esi
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x4052ab
push eax
call esi
mov eax, 0x4052b1
ret
push 0x60
mov dword [ebp - 4], 2
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, eax
add esp, 4
mov dword [ebp - 0x1c], ecx
xor edi, edi
mov byte [ebp - 4], 5
cmp ecx, edi
je 0x405316
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x48]
push edx
push eax
call fcn.00405e60
mov esi, eax
jmp 0x405318
xor esi, esi
mov ecx, dword [ebp - 0x44]
mov byte [ebp - 4], 2
push ecx
mov ecx, esi
mov dword [ebp - 0x14], esi
call fcn.00406830
mov edx, dword [ebp - 0x34]
mov ecx, esi
push edx
call fcn.00406850
push esi
lea ecx, [ebp - 0x18]
call fcn.00404ed0
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x18]
cmp eax, edi
je 0x405351
push 6
call dword [sym.imp.MSVCRT.dll_exit]
mov ecx, dword [sym.imp.MSVCP60.dll_const_std::basic_ofstream_char__struct_std::char_traits_char__::vbtable]
mov dword [ebp - 0x138], ecx
lea ecx, [ebp - 0xe0]
call dword [sym.imp.MSVCP60.dll_protected:_void___thiscall_std::ios_base::constructor_void_]
mov edx, dword [sym.imp.MSVCP60.dll_const_std::basic_ios_char__struct_std::char_traits_char__::vftable]
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0xe0], edx
push edi
push 1
lea eax, [ebp - 0x134]
push edi
push eax
lea ecx, [ebp - 0x138]
mov byte [ebp - 4], 6
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool__bool_]
push edi
lea ecx, [ebp - 0x134]
mov dword [ebp - 4], 7
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_filebuf_char__struct_std::char_traits_char__::constructor_struct__iobuf__]
mov ecx, dword [ebp - 0x138]
mov eax, dword [sym.imp.MSVCP60.dll_const_std::basic_ofstream_char__struct_std::char_traits_char__::vftable]
mov edx, dword [ecx + 4]
mov dword [ebp + edx - 0x138], eax
mov cl, byte [ebp - 0x1d]
push edi
mov byte [ebp - 0x64], cl
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 8
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x50], edi
mov ebx, dword [sym.imp.MSVCRT.dll_getenv]
push 0x40b388
mov byte [ebp - 4], 0xa
call ebx
add esp, 4
test eax, eax
je 0x4055fe
mov edx, dword [sym.imp.MSVCP60.dll_const_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::vbtable]
lea ecx, [ebp - 0x16c]
mov dword [ebp - 0x1bc], edx
call dword [sym.imp.MSVCP60.dll_protected:_void___thiscall_std::ios_base::constructor_void_]
mov eax, dword [sym.imp.MSVCP60.dll_const_std::basic_ios_char__struct_std::char_traits_char__::vftable]
mov esi, 3
mov dword [ebp - 0x16c], eax
mov dword [ebp - 0x1c], esi
push edi
push 1
lea ecx, [ebp - 0x1b8]
push edi
push ecx
lea ecx, [ebp - 0x1bc]
mov byte [ebp - 4], 0xb
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool__bool_]
push 2
lea ecx, [ebp - 0x1b8]
mov dword [ebp - 4], 0xc
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_int_]
mov edx, dword [ebp - 0x1bc]
mov ecx, dword [sym.imp.MSVCP60.dll_const_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::vftable]
mov eax, dword [edx + 4]
mov dword [ebp + eax - 0x1bc], ecx
push 0x40b388
mov byte [ebp - 4], 0xd
mov dword [ebp - 0x1c], esi
call ebx
mov esi, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___class_std::basic_ostream_char__struct_std::char_traits_char_____char_const__]
lea edx, [ebp - 0x1bc]
push eax
push edx
call esi
add esp, 0xc
push 0x40b198
push eax
call esi
add esp, 8
mov edi, eax
call dword [sym.imp.MSVCRT.dll__getpid]
push eax
mov ecx, edi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push 0x40b37c
push eax
call esi
add esp, 8
lea eax, [ebp - 0x1cc]
lea ecx, [ebp - 0x1bc]
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::str_void_]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [ebp - 4], 0xe
mov edx, dword [ecx]
lea ecx, [ebp - 0x64]
push edx
push 0
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [ebp - 0x1cc]
mov byte [ebp - 4], 0xd
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [ebp - 0x60]
test eax, eax
jne 0x4054f9
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov ecx, dword [ebp - 0xe4]
test ecx, ecx
jne 0x405538
push 2
push eax
call dword [sym.imp.MSVCP60.dll_struct__iobuf____cdecl_std::__Fiopen_char_const___int_]
add esp, 8
test eax, eax
je 0x405538
push 1
push eax
lea ecx, [ebp - 0x134]
call dword [sym.imp.MSVCP60.dll_protected:_void___thiscall_std::basic_filebuf_char__struct_std::char_traits_char__::_Init_struct__iobuf___enum_std::basic_filebuf_char__struct_std::char_traits_char__::_Initfl_]
lea ecx, [ebp - 0x134]
call dword [sym.imp.MSVCP60.dll_protected:_void___thiscall_std::basic_filebuf_char__struct_std::char_traits_char__::_Initcvt_void_]
lea eax, [ebp - 0x134]
test eax, eax
jne 0x405552
mov ecx, dword [ebp - 0x138]
push 0
push 2
mov edx, dword [ecx + 4]
lea ecx, [ebp + edx - 0x138]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
push 0x40b364
call ebx
add esp, 4
test eax, eax
je 0x405573
push 0x40b364
call ebx
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 8
jmp 0x405576
mov eax, dword [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x54]
call fcn.00405cb0
lea eax, [ebp - 0x138]
lea ecx, [ebp - 0x54]
push eax
call fcn.00405cd0
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::constructor_void_]
mov ecx, dword [sym.imp.MSVCP60.dll_bool_std::ios_base::_Sync]
mov byte [ecx], 1
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
mov eax, dword [ebp - 0x1bc]
lea edx, [ebp - 0x16c]
mov dword [ebp - 0x38], edx
mov edx, dword [sym.imp.MSVCP60.dll_const_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::vftable]
mov ecx, dword [eax + 4]
mov dword [ebp + ecx - 0x1bc], edx
lea ecx, [ebp - 0x1b8]
mov byte [ebp - 4], 0xf
call dword [sym.imp.MSVCP60.dll_public_virtual:_void___thiscall_std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [ebp - 0x1bc]
mov edx, dword [sym.imp.MSVCP60.dll_const_std::basic_ostream_char__struct_std::char_traits_char__::vftable]
mov byte [ebp - 4], 0xa
mov ecx, dword [eax + 4]
mov dword [ebp + ecx - 0x1bc], edx
lea ecx, [ebp - 0x16c]
call dword [sym.imp.MSVCP60.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov eax, dword [ebp - 0x3c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4058dd
mov ecx, dword [ebp - 0x14]
push 0x3c
mov edx, dword [ecx]
call dword [edx + 0x14]
cmp eax, 6
je 0x4058dd
cmp eax, 0x27
je 0x4055fe
xor esi, esi
push 0x38
lea eax, [ebp - 0xac]
push esi
push eax
call sub.MSVCRT.dll_memset
mov ecx, dword [ebp - 0x14]
add esp, 0xc
mov word [ebp - 0xac], 0x28a0
mov word [ebp - 0xaa], 0x38
lea edi, [ecx + 0x28]
mov dword [ebp - 0xa8], esi
mov dword [ebp - 0xa4], esi
lea eax, [ebp - 0xac]
mov edx, dword [edi]
push eax
mov ecx, edi
call dword [edx]
cmp eax, esi
jne 0x4058dd
mov edx, dword [ebp - 0x8c]
cmp edx, 6
jne 0x40569b
mov dword [ebp - 0x80], esi
mov edx, dword [edi]
lea eax, [ebp - 0xac]
mov ecx, edi
push eax
call dword [edx + 4]
jmp 0x4058dd
mov eax, dword [ebp - 0x94]
mov ecx, dword [ebp - 0x90]
mov esi, eax
xor ebx, ebx
and esi, ecx
cmp esi, 0xffffffff
jne 0x405744
push edx
lea ecx, [ebp - 0x18]
call fcn.00404f10
mov ebx, eax
test ebx, ebx
jne 0x4058a7
mov edx, dword [ebp - 0x8c]
mov eax, edx
mov byte [ebp - 4], 0x10
dec eax
je 0x4057c4
dec eax
je 0x405771
dec eax
jne 0x405819
push 0x80
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
add esp, 4
mov dword [ebp - 0x38], ebx
test ebx, ebx
mov byte [ebp - 4], 0x11
je 0x405817
mov cl, byte [ebp - 0x30]
sub esp, 0x10
mov esi, esp
mov dword [ebp - 0x40], esp
push 0
mov byte [esi], cl
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea ecx, [ebp - 0x30]
mov eax, dword [edx]
push eax
push 0
push ecx
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov ecx, ebx
call fcn.00404170
mov ebx, eax
jmp 0x405819
test ecx, ecx
jl 0x40575d
jg 0x40574e
test eax, eax
jbe 0x40575d
push ecx
push eax
lea ecx, [ebp - 0x18]
call fcn.00404f30
jmp 0x4056bf
or eax, ecx
je 0x4056cf
mov dword [ebp - 0x80], 0x29
jmp 0x40586d
push 0x78
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
add esp, 4
mov dword [ebp - 0x40], ebx
test ebx, ebx
mov byte [ebp - 4], 0x12
je 0x405817
mov dl, byte [ebp - 0x30]
sub esp, 0x10
mov esi, esp
mov dword [ebp - 0x38], esp
push 0
mov ecx, esi
mov byte [esi], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea edx, [ebp - 0x30]
mov ecx, dword [eax]
push ecx
push 0
push edx
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov ecx, ebx
call fcn.00402be0
mov ebx, eax
jmp 0x405819
push pe_nt_image_headers32
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
add esp, 4
mov dword [ebp - 0x40], ebx
test ebx, ebx
mov byte [ebp - 4], 0x13
je 0x405817
mov al, byte [ebp - 0x30]
sub esp, 0x10
mov esi, esp
mov dword [ebp - 0x38], esp
push 0
mov ecx, esi
mov byte [esi], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea eax, [ebp - 0x30]
mov edx, dword [ecx]
mov ecx, esi
push edx
push 0
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov ecx, ebx
call fcn.00401990
mov ebx, eax
jmp 0x405819
xor ebx, ebx
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x405833
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
mov ecx, dword [edx + eax + 4]
test ecx, ecx
jne 0x405833
lea eax, [ebp - 0x54]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 4], 0xa
test eax, eax
jl 0x405895
jg 0x405850
mov ecx, dword [ebp - 0x9c]
test ecx, ecx
jbe 0x405895
mov ecx, dword [ebp - 0x9c]
push eax
push ecx
lea ecx, [ebp - 0x18]
call fcn.00404f30
mov ecx, eax
test ecx, ecx
jne 0x405884
mov dword [ebp - 0x80], 0x28
mov edx, dword [edi]
lea eax, [ebp - 0xac]
push eax
mov ecx, edi
call dword [edx + 4]
test eax, eax
jne 0x4058dd
jmp 0x4055fe
mov eax, ecx
cdq
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
mov ecx, dword [ecx + 0x20]
mov dword [ebx + 0x20], ecx
jmp 0x40589e
mov eax, ebx
cdq
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
push ebx
lea ecx, [ebp - 0x18]
call fcn.00404ed0
mov eax, dword [ebp - 0x14]
mov edx, dword [ebx]
neg eax
sbb eax, eax
mov ecx, 0xe
and eax, edi
lea esi, [ebp - 0xac]
push eax
sub esp, 0x38
mov edi, esp
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
call dword [edx + 4]
cmp eax, 0x25
je 0x4058dd
cmp eax, 0x26
je 0x4058dd
cmp eax, 0x27
jne 0x4055fe
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xe4]
xor edi, edi
cmp eax, edi
je 0x405948
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
test eax, eax
jne 0x40591a
push 2
push edi
lea ecx, [ebp - 0x134]
call dword [sym.imp.MSVCP60.dll_protected:_void___thiscall_std::basic_filebuf_char__struct_std::char_traits_char__::_Init_struct__iobuf___enum_std::basic_filebuf_char__struct_std::char_traits_char__::_Initfl_]
lea ecx, [ebp - 0x134]
test ecx, ecx
jne 0x405948
mov edx, dword [ebp - 0x138]
mov eax, dword [edx + 4]
mov edx, dword [ebp + eax - 0x110]
lea ecx, [ebp + eax - 0x138]
mov eax, dword [ebp + eax - 0x134]
or al, 2
cmp edx, edi
jne 0x405940
or al, 4
push edi
push eax
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::ios_base::clear_int__bool_]
mov eax, dword [ebp - 0x60]
mov ecx, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
cmp eax, edi
je 0x405957
mov ecx, eax
cmp ecx, edi
je 0x405986
push 0x40b354
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
test eax, eax
mov eax, dword [ebp - 0x60]
jne 0x405986
cmp eax, edi
jne 0x405979
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
call dword [sym.imp.MSVCRT.dll__unlink]
mov eax, dword [ebp - 0x60]
add esp, 4
cmp eax, edi
je 0x405a7c
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x405a73
cmp al, 0xff
je 0x405a73
dec al
mov byte [ecx], al
jmp 0x405a7c
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edx, dword [ebp - 0x138]
lea ecx, [ebp - 0xe0]
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x58], edi
mov eax, dword [edx + 4]
mov dword [ebp - 0x40], ecx
mov ecx, dword [sym.imp.MSVCP60.dll_const_std::basic_ofstream_char__struct_std::char_traits_char__::vftable]
mov dword [ebp + eax - 0x138], ecx
mov eax, dword [sym.imp.MSVCP60.dll_const_std::basic_filebuf_char__struct_std::char_traits_char__::vftable]
lea edx, [ebp - 0x134]
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x134], eax
mov al, byte [ebp - 0xec]
mov byte [ebp - 4], 0x18
test al, al
je 0x405aed
mov eax, dword [ebp - 0xe4]
cmp eax, edi
je 0x405aed
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
test eax, eax
jne 0x405aed
push 2
push edi
lea ecx, [ebp - 0x134]
call dword [sym.imp.MSVCP60.dll_protected:_void___thiscall_std::basic_filebuf_char__struct_std::char_traits_char__::_Init_struct__iobuf___enum_std::basic_filebuf_char__struct_std::char_traits_char__::_Initfl_]
mov ecx, dword [ebp - 0xf0]
cmp ecx, edi
mov esi, ecx
je 0x405b0a
push 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
lea ecx, [ebp - 0xe8]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::locale::destructor_void_]
lea ecx, [ebp - 0x134]
mov byte [ebp - 4], 0x16
call dword [sym.imp.MSVCP60.dll_public_virtual:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void_]
mov ecx, dword [ebp - 0x138]
mov eax, dword [sym.imp.MSVCP60.dll_const_std::basic_ostream_char__struct_std::char_traits_char__::vftable]
mov byte [ebp - 4], 2
mov edx, dword [ecx + 4]
mov dword [ebp + edx - 0x138], eax
mov ecx, dword [sym.imp.MSVCP60.dll_const_std::basic_ios_char__struct_std::char_traits_char__::vftable]
mov dword [ebp - 0xe0], ecx
lea ecx, [ebp - 0xe0]
call dword [sym.imp.MSVCP60.dll_public_virtual:_void___thiscall_std::ios_base::destructor_void_]
mov eax, dword [ebp - 0x2c]
cmp eax, edi
je 0x405b7b
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x405b72
cmp al, 0xff
je 0x405b72
dec al
mov byte [ecx], al
jmp 0x405b7b
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], 0xffffffff
call fcn.00404ea0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.00404ea0
mov eax, 0x22
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10