Function at 0x479910
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0x148]
mov ecx, 0x52
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov eax, dword [0x639704]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], ecx
call fcn.00408df0
mov word [ebp - 0x13a], ax
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x13a]
push ecx
call fcn.004016b8
add esp, 8
movzx edx, al
test edx, edx
je 0x479974
lea eax, [ebp + 8]
push eax
call fcn.00402009
add esp, 4
jmp 0x479b8d
mov esi, esp
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::pptr_void_const]
cmp esi, esp
call fcn.00407923
test eax, eax
je 0x4799ec
mov esi, esp
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::pptr_void_const]
cmp esi, esp
call fcn.00407923
mov esi, eax
mov edi, esp
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::epptr_void_const]
cmp edi, esp
call fcn.00407923
cmp esi, eax
jae 0x4799ec
lea eax, [ebp + 8]
push eax
call fcn.004065f5
add esp, 4
mov word [ebp - 0x142], ax
mov esi, esp
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_wchar_t____thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::_Pninc_void_]
cmp esi, esp
call fcn.00407923
mov cx, word [ebp - 0x142]
mov word [eax], cx
mov ax, word [ebp + 8]
jmp 0x479b8d
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x4c], 0
jne 0x4799ff
call fcn.00408df0
jmp 0x479b8d
mov ecx, dword [ebp - 0xc]
call fcn.004077de
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x38], 0
jne 0x479a72
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4c]
mov dword [ebp - 0x144], ecx
lea edx, [ebp + 8]
push edx
call fcn.004065f5
add esp, 4
mov word [ebp - 0x146], ax
mov eax, dword [ebp - 0x144]
push eax
movzx ecx, word [ebp - 0x146]
push ecx
call fcn.0040806c
add esp, 8
movzx edx, al
test edx, edx
je 0x479a5a
mov ax, word [ebp + 8]
mov word [ebp - 0x148], ax
jmp 0x479a66
call fcn.00408df0
mov word [ebp - 0x148], ax
mov ax, word [ebp - 0x148]
jmp 0x479b8d
mov dword [ebp - 0x18], 0x20
lea eax, [ebp + 8]
push eax
call fcn.004065f5
add esp, 4
mov word [ebp - 0x4c], ax
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x38]
mov dword [ebp - 0x144], 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 - 0x4a]
push eax
lea ecx, [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0xc]
add edx, 0x40
push edx
mov ecx, dword [ebp - 0x144]
call dword [sym.imp.MSVCP140D.dll_public:_int___thiscall_std::codecvt_wchar_t__char__struct__Mbstatet_::out_struct__Mbstatet___wchar_t_const___wchar_t_const___wchar_t_const____char___char___char___const]
cmp esi, esp
call fcn.00407923
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 0
jl 0x479b88
cmp dword [ebp - 0x148], 1
jle 0x479af3
cmp dword [ebp - 0x148], 3
je 0x479b4b
jmp 0x479b88
mov eax, dword [ebp - 0x64]
lea ecx, [ebp - 0x40]
sub eax, ecx
mov dword [ebp - 0x70], eax
je 0x479b2f
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.00407923
cmp dword [ebp - 0x70], eax
je 0x479b2f
call fcn.00408df0
jmp 0x479b8d
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x3e], 1
lea eax, [ebp - 0x4c]
cmp dword [ebp - 0x58], eax
je 0x479b44
mov ax, word [ebp + 8]
jmp 0x479b8d
call fcn.00408df0
jmp 0x479b8d
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4c]
push ecx
movzx edx, word [ebp - 0x4c]
push edx
call fcn.0040806c
add esp, 8
movzx eax, al
test eax, eax
je 0x479b73
mov cx, word [ebp + 8]
mov word [ebp - 0x142], cx
jmp 0x479b7f
call fcn.00408df0
mov word [ebp - 0x142], ax
mov ax, word [ebp - 0x142]
jmp 0x479b8d
call fcn.00408df0
push edx
mov ecx, ebp
push eax
lea edx, [0x479bc0]
call fcn.00407e46
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406c44
add esp, 0x148
cmp ebp, esp
call fcn.00407923
mov esp, ebp
pop ebp
ret 4