Function at 0x407410
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40cff1
mov eax, dword fs:[0]
push eax
sub esp, 0x9b8
mov eax, dword [0x413018]
xor eax, esp
mov dword [esp + 0x9b4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x413018]
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 [0x415628]
mov dword [esp + 0x18], eax
cmp byte [0x415625], bl
je 0x407763
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 0x407498
lea ecx, [esp + 0x9e0]
lea edx, [esp + 0x5c8]
nop
mov al, byte [ecx]
inc ecx
inc edx
cmp al, bl
jne 0x4074a0
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 0x4074d4
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 0x40751c
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 0x407575
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 0x4075a8
lea eax, [esp + 0x9e0]
push 0xfde9
lea ecx, [esp + 0xb0]
push eax
lea eax, [esp + 0xb0]
mov dword [esp + 0xb0], ecx
call fcn.0040ac10
lea edx, [esp + 0x1c]
mov byte [esp + 0x9d4], 2
mov ecx, dword [esp + 0xa8]
push edx
call fcn.0040aa60
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 0x407607
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.0040ab50
lea ecx, [esp + 0x14]
mov byte [esp + 0x9d4], 5
push ecx
mov ecx, dword [esp + 0x28]
call fcn.0040a9c0
mov byte [esp + 0x9d4], 7
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x28]
cmp eax, edx
je 0x40764e
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 0x407657
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 0x4076a6
push 0x1b
sub esp, 0x1c
mov eax, esp
mov dword [esp + 0x38], esp
lea ecx, [esp + 0x9fc]
push ecx
push 0x415dd0
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.00408250
add esp, 0x20
mov eax, dword [esp + 0x9e0]
cmp dword [esp + 0x9f4], edi
jae 0x4076bd
lea eax, [esp + 0x9e0]
push 0x40fa44
push eax
call dword [sym.imp.MSVCR90.dll_strstr]
add esp, 8
test eax, eax
je 0x4076fd
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 0x4076e0
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 [0x415625], 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 0x407725
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 0x40774d
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 0x407781
push 0x1b
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x38], esp
push 0x415dd0
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.00408250
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.0040b57a
add esp, 0x9c4
ret 0x1c