Function at 0x10004880
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10012ef2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18c
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov dword [ebp - 0x10], esp
push 0x2c
push ebx
mov dword [ebp - 0x18], 0xffffffff
call dword [sym.imp.MSVCRT.dll_strchr]
mov edi, eax
add esp, 8
test edi, edi
je 0x10004b23
mov esi, edi
lea eax, [ebp - 0x198]
sub esi, ebx
push esi
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
inc edi
push 0x2c
push edi
mov byte [ebp + esi - 0x198], 0
call dword [sym.imp.MSVCRT.dll_strchr]
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x10004b23
mov esi, ebx
lea ecx, [ebp - 0x94]
sub esi, edi
push esi
push edi
push ecx
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
inc ebx
mov dword [ebp + 0x10], ebx
mov dl, byte [ebp + 0x13]
push 0
lea ecx, [ebp - 0x38]
mov byte [ebp + esi - 0x94], 0
mov dword [ebp - 0x14], 0
mov byte [ebp - 0x38], 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_]
lea edi, [ebp - 0x198]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [ebp - 0x38]
push ebx
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 0x10004975
mov edi, dword [ebp - 0x34]
mov ecx, ebx
mov eax, ecx
lea esi, [ebp - 0x198]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x38]
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_]
lea ecx, [ebp - 0x38]
lea edx, [ebp - 0x5c]
push ecx
push edx
mov ecx, 0x1001a708
mov dword [ebp - 4], 0
call fcn.10006380
mov esi, dword [eax]
or ebx, 0xffffffff
push 1
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
cmp esi, dword [0x1001a70c]
je 0x100049ae
mov eax, dword [esi + 0x1c]
jmp 0x100049bb
lea eax, [ebp - 0x198]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [ebp - 0x14], eax
je 0x10004b23
lea ecx, [ebp - 0x94]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x10004b19
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 4], 1
push ecx
call eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
test eax, eax
mov dword [ebp - 4], ebx
jne 0x10004b19
mov al, byte [ebp + 0x13]
push 0
lea ecx, [ebp - 0x28]
mov byte [ebp - 0x28], 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_]
lea edi, [ebp - 0x198]
mov ecx, ebx
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [ebp - 0x28]
push ebx
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 0x10004a4f
mov edi, dword [ebp - 0x24]
mov ecx, ebx
mov edx, ecx
lea esi, [ebp - 0x198]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], ebx
mov byte [eax + ebx], 0
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x28]
push ecx
lea eax, [ebp - 0x74]
push edx
push eax
mov dword [ebp - 4], 3
call fcn.10006bc0
add esp, 0xc
mov esi, eax
mov cl, byte [esi]
mov bl, 4
mov byte [ebp - 0x54], cl
push 0
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], bl
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 - 0x54]
mov eax, dword [edx]
push eax
push 0
push 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, dword [esi + 0x10]
mov dword [ebp - 0x44], ecx
lea edx, [ebp - 0x54]
lea eax, [ebp - 0x60]
push edx
push eax
mov ecx, 0x1001a708
mov byte [ebp - 4], 5
call fcn.10005b80
push 1
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], bl
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 - 0x70]
test eax, eax
je 0x10004ae4
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x10004adb
cmp al, 0xff
je 0x10004adb
dec al
mov byte [ecx], al
jmp 0x10004ae4
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x10004b23
mov al, byte [ecx - 1]
test al, al
je 0x10004afd
cmp al, 0xff
je 0x10004afd
dec al
mov byte [ecx - 1], al
jmp 0x10004b23
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x10004b23
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edx, dword [ebp - 0x18]
lea eax, [ebp - 0x58]
push 0
mov dword [ebp - 0x3c], edx
mov edx, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x40]
push 8
push ecx
push edx
mov dword [ebp - 0x40], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret