Function at 0x10139ed0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0x80]
mov ecx, 0x20
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov eax, dword [0x10191a80]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], ecx
mov ecx, 0x101997a3
call fcn.1014e9b0
mov eax, dword [ebp + 8]
push eax
call fcn.100069e0
push eax
call fcn.10006a20
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x10139f2e
mov eax, dword [ebp + 8]
push eax
call fcn.10139830
add esp, 4
jmp 0x1013a134
mov esi, esp
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
cmp esi, esp
call fcn.1014e980
test eax, eax
je 0x10139fa2
mov esi, esp
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
cmp esi, esp
call fcn.1014e980
mov esi, eax
mov edi, esp
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::epptr_void_const]
cmp edi, esp
call fcn.1014e980
cmp esi, eax
jae 0x10139fa2
mov eax, dword [ebp + 8]
push eax
call fcn.101401f0
add esp, 4
mov byte [ebp - 0x135], al
mov esi, esp
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
cmp esi, esp
call fcn.1014e980
mov cl, byte [ebp - 0x135]
mov byte [eax], cl
mov eax, dword [ebp + 8]
jmp 0x1013a134
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x4c], 0
jne 0x10139fb5
call fcn.100069e0
jmp 0x1013a134
mov ecx, dword [ebp - 0xc]
call fcn.10121e90
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x38], 0
jne 0x1013a023
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4c]
mov dword [ebp - 0x138], ecx
mov edx, dword [ebp + 8]
push edx
call fcn.101401f0
add esp, 4
mov byte [ebp - 0x139], al
mov eax, dword [ebp - 0x138]
push eax
movzx ecx, byte [ebp - 0x139]
push ecx
call fcn.100ca7b0
add esp, 8
movzx edx, al
test edx, edx
je 0x1013a00d
mov eax, dword [ebp + 8]
mov dword [ebp - 0x140], eax
jmp 0x1013a018
call fcn.100069e0
mov dword [ebp - 0x140], eax
mov eax, dword [ebp - 0x140]
jmp 0x1013a134
mov dword [ebp - 0x18], 0x20
mov eax, dword [ebp + 8]
push eax
call fcn.101401f0
add esp, 4
mov byte [ebp - 0x49], al
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x38]
mov dword [ebp - 0x138], ecx
mov esi, esp
lea edx, [ebp - 0x64]
push edx
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x40]
push ecx
lea edx, [ebp - 0x58]
push edx
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x49]
push ecx
mov edx, dword [ebp - 0xc]
add edx, 0x40
push edx
mov ecx, dword [ebp - 0x138]
call dword [sym.imp.MSVCP140D.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
cmp esi, esp
call fcn.1014e980
mov dword [ebp - 0x13c], eax
cmp dword [ebp - 0x13c], 0
je 0x1013a09f
cmp dword [ebp - 0x13c], 1
je 0x1013a09f
cmp dword [ebp - 0x13c], 3
je 0x1013a0f6
jmp 0x1013a12f
mov eax, dword [ebp - 0x64]
lea ecx, [ebp - 0x40]
sub eax, ecx
mov dword [ebp - 0x70], eax
je 0x1013a0db
mov esi, esp
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x70]
push edx
push 1
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.ucrtbased.dll_fwrite]
add esp, 0x10
cmp esi, esp
call fcn.1014e980
cmp dword [ebp - 0x70], eax
je 0x1013a0db
call fcn.100069e0
jmp 0x1013a134
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x3d], 1
lea eax, [ebp - 0x49]
cmp dword [ebp - 0x58], eax
je 0x1013a0ef
mov eax, dword [ebp + 8]
jmp 0x1013a134
call fcn.100069e0
jmp 0x1013a134
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4c]
push ecx
movzx edx, byte [ebp - 0x49]
push edx
call fcn.100ca7b0
add esp, 8
movzx eax, al
test eax, eax
je 0x1013a11c
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x138], ecx
jmp 0x1013a127
call fcn.100069e0
mov dword [ebp - 0x138], eax
mov eax, dword [ebp - 0x138]
jmp 0x1013a134
call fcn.100069e0
push edx
mov ecx, ebp
push eax
lea edx, [0x1013a168]
call fcn.1014e920
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1014e9f0
add esp, 0x140
cmp ebp, esp
call fcn.1014e980
mov esp, ebp
pop ebp
ret 4