Function at 0x406c20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0x6c]
mov ecx, 0x1b
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov eax, dword [0x419008]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 8], ecx
call fcn.00401d50
mov dword [ebp - 0x60], eax
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x60]
push ecx
call fcn.00401d60
add esp, 8
movzx edx, al
test edx, edx
je 0x406c77
lea eax, [ebp + 8]
push eax
call fcn.00407ab0
add esp, 4
jmp 0x406e33
mov esi, esp
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
cmp esi, esp
call fcn.00410b80
test eax, eax
je 0x406ce1
mov esi, esp
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
cmp esi, esp
call fcn.00410b80
mov esi, eax
mov edi, esp
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::epptr_void_const]
cmp edi, esp
call fcn.00410b80
cmp esi, eax
jae 0x406ce1
lea ecx, [ebp + 8]
push ecx
call fcn.00406eb0
add esp, 4
mov bl, al
mov esi, esp
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
cmp esi, esp
call fcn.00410b80
mov byte [eax], bl
mov eax, dword [ebp + 8]
jmp 0x406e33
mov edx, dword [ebp - 8]
cmp dword [edx + 0x4c], 0
jne 0x406cf4
call fcn.00401d50
jmp 0x406e33
mov ecx, dword [ebp - 8]
call fcn.004073b0
mov eax, dword [ebp - 8]
cmp dword [eax + 0x38], 0
jne 0x406d43
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x4c]
push edx
lea eax, [ebp + 8]
push eax
call fcn.00406eb0
add esp, 4
movzx ecx, al
push ecx
call fcn.00405e10
add esp, 8
movzx edx, al
test edx, edx
je 0x406d33
mov eax, dword [ebp + 8]
mov dword [ebp - 0x64], eax
jmp 0x406d3b
call fcn.00401d50
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x64]
jmp 0x406e33
mov dword [ebp - 0xc], 0x20
lea ecx, [ebp + 8]
push ecx
call fcn.00406eb0
add esp, 4
mov byte [ebp - 0x39], al
mov esi, esp
lea edx, [ebp - 0x54]
push edx
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 0x48]
push edx
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x39]
push ecx
mov edx, dword [ebp - 8]
add edx, 0x40
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x38]
call dword [sym.imp.MSVCP140.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.00410b80
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0
je 0x406da7
cmp dword [ebp - 0x68], 1
je 0x406da7
cmp dword [ebp - 0x68], 3
je 0x406dfe
jmp 0x406e2e
mov ecx, dword [ebp - 0x54]
lea edx, [ebp - 0x30]
sub ecx, edx
mov dword [ebp - 0x5c], ecx
je 0x406de3
mov esi, esp
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
push 1
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp esi, esp
call fcn.00410b80
cmp dword [ebp - 0x5c], eax
je 0x406de3
call fcn.00401d50
jmp 0x406e33
mov ecx, dword [ebp - 8]
mov byte [ecx + 0x3d], 1
lea edx, [ebp - 0x39]
cmp dword [ebp - 0x48], edx
je 0x406df7
mov eax, dword [ebp + 8]
jmp 0x406e33
call fcn.00401d50
jmp 0x406e33
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x4c]
push ecx
movzx edx, byte [ebp - 0x39]
push edx
call fcn.00405e10
add esp, 8
movzx eax, al
test eax, eax
je 0x406e21
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x6c], ecx
jmp 0x406e29
call fcn.00401d50
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x6c]
jmp 0x406e33
call fcn.00401d50
push edx
mov ecx, ebp
push eax
lea edx, [0x406e64]
call fcn.00410b2c
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040fca9
add esp, 0x6c
cmp ebp, esp
call fcn.00410b80
mov esp, ebp
pop ebp
ret 4