Function at 0x1004d100
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push ebx
push esi
mov dword [ebp - 8], ecx
call fcn.1004c540
mov dword [ebp - 0x1c], eax
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x1c]
push ecx
call fcn.1004c550
add esp, 8
movzx edx, al
test edx, edx
je 0x1004d13d
lea eax, [ebp + 8]
push eax
call fcn.1004d030
add esp, 4
jmp 0x1004d3aa
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP120.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
test eax, eax
je 0x1004d185
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP120.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
mov esi, eax
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP120.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::epptr_void_const]
cmp esi, eax
jae 0x1004d185
lea ecx, [ebp + 8]
push ecx
call fcn.1004d960
add esp, 4
mov bl, al
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP120.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
mov byte [eax], bl
mov eax, dword [ebp + 8]
jmp 0x1004d3aa
mov edx, dword [ebp - 8]
cmp dword [edx + 0x50], 0
jne 0x1004d198
call fcn.1004c540
jmp 0x1004d3aa
mov ecx, dword [ebp - 8]
call fcn.1004c080
mov eax, dword [ebp - 8]
cmp dword [eax + 0x40], 0
jne 0x1004d1ec
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x50]
push edx
lea eax, [ebp + 8]
push eax
call fcn.1004d960
add esp, 4
movzx ecx, al
push ecx
call fcn.100481d0
add esp, 8
movzx edx, al
test edx, edx
je 0x1004d1d7
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
jmp 0x1004d1df
call fcn.1004c540
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
jmp 0x1004d3aa
mov dword [ebp - 0x3c], 8
lea ecx, [ebp + 8]
push ecx
call fcn.1004d960
add esp, 4
mov byte [ebp - 2], al
push 0
push 8
lea ecx, [ebp - 0x64]
call fcn.1004a9e0
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x64]
call fcn.1003db30
mov ecx, eax
call fcn.1003c4e0
mov esi, eax
lea ecx, [ebp - 0x64]
call fcn.1003eda0
add esi, eax
push esi
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x64]
call fcn.1003db30
mov ecx, eax
call fcn.1003c4e0
push eax
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 1]
push eax
lea ecx, [ebp - 2]
push ecx
mov edx, dword [ebp - 8]
add edx, 0x48
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x40]
call dword [sym.imp.MSVCP120.dll_public:_int___thiscall_std::codecvt_char__char__int_::out_int___char_const___char_const___char_const____char___char___char___const]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jl 0x1004d388
cmp dword [ebp - 0x10], 1
jle 0x1004d287
cmp dword [ebp - 0x10], 3
je 0x1004d34a
jmp 0x1004d388
lea ecx, [ebp - 0x48]
push ecx
lea ecx, [ebp - 0x64]
call fcn.1003db30
mov ecx, eax
call fcn.1003c4e0
mov edx, dword [ebp - 0x20]
sub edx, eax
mov dword [ebp - 0xc], edx
je 0x1004d2eb
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x50]
push ecx
mov edx, dword [ebp - 0xc]
push edx
push 1
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x64]
call fcn.1003db30
mov ecx, eax
call fcn.1003c4e0
push eax
call dword [sym.imp.MSVCR120.dll_fwrite]
add esp, 0x10
cmp dword [ebp - 0xc], eax
je 0x1004d2eb
call fcn.1004c540
mov dword [ebp - 0x24], eax
lea ecx, [ebp - 0x64]
call fcn.1003c380
mov eax, dword [ebp - 0x24]
jmp 0x1004d3aa
mov ecx, dword [ebp - 8]
mov byte [ecx + 0x45], 1
lea edx, [ebp - 2]
cmp dword [ebp - 0x28], edx
je 0x1004d310
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2c], eax
lea ecx, [ebp - 0x64]
call fcn.1003c380
mov eax, dword [ebp - 0x2c]
jmp 0x1004d3aa
cmp dword [ebp - 0xc], 0
jbe 0x1004d318
jmp 0x1004d348
lea ecx, [ebp - 0x64]
call fcn.1003eda0
cmp eax, 0x20
jae 0x1004d333
push 0
push 8
lea ecx, [ebp - 0x64]
call fcn.100449d0
jmp 0x1004d348
call fcn.1004c540
mov dword [ebp - 0x30], eax
lea ecx, [ebp - 0x64]
call fcn.1003c380
mov eax, dword [ebp - 0x30]
jmp 0x1004d3aa
jmp 0x1004d39d
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x50]
push edx
movzx eax, byte [ebp - 2]
push eax
call fcn.100481d0
add esp, 8
movzx ecx, al
test ecx, ecx
je 0x1004d36d
mov edx, dword [ebp + 8]
mov dword [ebp - 0x18], edx
jmp 0x1004d375
call fcn.1004c540
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x64]
call fcn.1003c380
mov eax, dword [ebp - 0x34]
jmp 0x1004d3aa
call fcn.1004c540
mov dword [ebp - 0x38], eax
lea ecx, [ebp - 0x64]
call fcn.1003c380
mov eax, dword [ebp - 0x38]
jmp 0x1004d3aa
jmp 0x1004d20e
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4