Function at 0x4065f0
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40b291
mov eax, dword fs:[0]
push eax
sub esp, 0x9b8
mov eax, dword [0x410018]
xor eax, esp
mov dword [esp + 0x9b4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x410018]
xor eax, esp
push eax
lea eax, [esp + 0x9cc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x9d4], ebx
mov eax, dword [0x4125e0]
mov dword [esp + 0x18], eax
cmp byte [0x4125dd], bl
je 0x406943
push 0xa
lea ecx, [esp + 0x9e0]
mov dword [esp + 0x24], ebx
call dword [sym.imp.MSVCP90.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__::operator_char_]
mov ecx, dword [esp + 0x9e0]
mov ebp, 0x10
cmp dword [esp + 0x9f4], ebp
jae 0x406678
lea ecx, [esp + 0x9e0]
lea edx, [esp + 0x5c8]
nop
mov al, byte [ecx]
inc ecx
inc edx
cmp al, bl
jne 0x406680
lea ecx, [esp + 0x1ac]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov byte [esp + 0x9d4], 1
mov eax, dword [esp + 0x9e0]
cmp dword [esp + 0x9f4], ebp
jae 0x4066b4
lea eax, [esp + 0x9e0]
mov ecx, dword [esp + 0x9f0]
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebx
push ebx
push ecx
push eax
push ebx
push 0x35a
call esi
add eax, 0xa
push eax
lea ecx, [esp + 0x1b0]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::resize_unsigned_int_]
cmp dword [esp + 0x9f4], ebp
mov edi, dword [esp + 0x9f0]
mov ebp, dword [esp + 0x9e0]
jae 0x4066fc
lea ebp, [esp + 0x9e0]
mov edx, dword [esp + 0x1c0]
push edx
push ebx
lea ecx, [esp + 0x1b4]
call dword [sym.imp.MSVCP90.dll_public:_wchar_t____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator___unsigned_int_]
push eax
push edi
push ebp
push ebx
push 0x35a
call esi
push 0x3fe
lea ecx, [esp + 0x1ce]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x1d4], ax
call sub.MSVCR90.dll_memset
mov eax, dword [esp + 0x1bc]
add esp, 0xc
cmp dword [esp + 0x1c4], 8
jae 0x406755
lea eax, [esp + 0x1b0]
push 0x400
push eax
lea edx, [esp + 0x1d0]
push edx
call dword [sym.imp.MSVCR90.dll_wcstombs]
mov eax, dword [esp + 0x9ec]
mov edi, 0x10
add esp, 0xc
cmp dword [esp + 0x9f4], edi
jae 0x406788
lea eax, [esp + 0x9e0]
push 0xfde9
lea ecx, [esp + 0xb0]
push eax
lea eax, [esp + 0xb0]
mov dword [esp + 0xb0], ecx
call fcn.00409390
lea edx, [esp + 0x1c]
mov byte [esp + 0x9d4], 2
mov ecx, dword [esp + 0xa8]
push edx
call fcn.004091e0
mov byte [esp + 0x9d4], 4
mov eax, dword [esp + 0xa8]
mov esi, dword [sym.imp.MSVCR90.dll_free]
lea ecx, [esp + 0xac]
cmp eax, ecx
je 0x4067e7
push eax
call esi
add esp, 4
mov eax, dword [esp + 0x1c]
push ebx
lea edx, [esp + 0x2c]
push eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], edx
call fcn.004092d0
lea ecx, [esp + 0x14]
mov byte [esp + 0x9d4], 5
push ecx
mov ecx, dword [esp + 0x28]
call fcn.00409140
mov byte [esp + 0x9d4], 7
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x28]
cmp eax, edx
je 0x40682e
push eax
call esi
add esp, 4
mov edx, dword [esp + 0x14]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x406837
mov ebp, dword [esp + 0x18]
push ebx
lea ecx, [esp + 0x24]
push ecx
sub eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
push edx
mov edx, dword [ebp + 0x20]
push edx
call esi
test eax, eax
jne 0x406886
push 3
sub esp, 0x1c
mov eax, esp
mov dword [esp + 0x38], esp
lea ecx, [esp + 0x9fc]
push ecx
push 0x412cc4
push eax
call dword [sym.imp.MSVCP90.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_char__struct_std::char_traits_char___class_std::allocator_char___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
add esp, 0xc
call fcn.00407160
add esp, 0x20
mov eax, dword [esp + 0x9e0]
cmp dword [esp + 0x9f4], edi
jae 0x40689d
lea eax, [esp + 0x9e0]
push 0x40c734
push eax
call dword [sym.imp.MSVCR90.dll_strstr]
add esp, 8
test eax, eax
je 0x4068dd
mov edx, dword [esp + 0x14]
mov eax, edx
lea edi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4068c0
push ebx
lea ecx, [esp + 0x24]
push ecx
sub eax, edi
push eax
push edx
mov edx, dword [ebp + 0x20]
push edx
call esi
mov byte [0x4125dd], bl
mov byte [esp + 0x9d4], 4
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406905
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x9d4], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40692d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x1ac]
mov byte [esp + 0x9d4], bl
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
jmp 0x406961
push 3
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x38], esp
push 0x412cc4
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
call fcn.00407160
add esp, 0x20
lea ecx, [esp + 0x9dc]
mov dword [esp + 0x9d4], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov ecx, dword [esp + 0x9cc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x9b4]
xor ecx, esp
call fcn.00409cfa
add esp, 0x9c4
ret 0x1c