Function at 0x18002186c
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x1f8
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0x3e
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x218]
mov rax, qword [0x1804a0400]
xor rax, rbp
mov qword [rbp + 0x1a8], rax
lea rcx, [0x180507433]
call fcn.180237068
nop
call fcn.1800211ac
mov edx, dword [rbp + 0x1d8]
mov ecx, eax
call fcn.180021234
movzx eax, al
test eax, eax
je 0x1800218e3
mov ecx, dword [rbp + 0x1d8]
call fcn.1800216dc
jmp 0x180021b4b
mov rcx, qword [rbp + 0x1d0]
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const___ptr64]
test rax, rax
je 0x180021953
mov rcx, qword [rbp + 0x1d0]
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const___ptr64]
mov qword [rbp + 0x198], rax
mov rcx, qword [rbp + 0x1d0]
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::epptr_void_const___ptr64]
mov rcx, qword [rbp + 0x198]
cmp rcx, rax
jae 0x180021953
mov ecx, dword [rbp + 0x1d8]
call fcn.180022efc
mov byte [rbp + 0x194], al
mov rcx, qword [rbp + 0x1d0]
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void____ptr64]
mov cl, byte [rbp + 0x194]
mov byte [rax], cl
mov eax, dword [rbp + 0x1d8]
jmp 0x180021b4b
mov rax, qword [rbp + 0x1d0]
cmp qword [rax + 0x80], 0
jne 0x18002196e
call fcn.1800211ac
jmp 0x180021b4b
mov rcx, qword [rbp + 0x1d0]
call fcn.1800208e4
nop
mov rax, qword [rbp + 0x1d0]
cmp qword [rax + 0x68], 0
jne 0x1800219ec
mov rax, qword [rbp + 0x1d0]
mov rax, qword [rax + 0x80]
mov qword [rbp + 0x198], rax
mov ecx, dword [rbp + 0x1d8]
call fcn.180022efc
mov byte [rbp + 0x1a0], al
mov rdx, qword [rbp + 0x198]
mov cl, byte [rbp + 0x1a0]
call fcn.18001b758
movzx eax, al
test eax, eax
je 0x1800219d6
mov eax, dword [rbp + 0x1d8]
mov dword [rbp + 0x1a4], eax
jmp 0x1800219e1
call fcn.1800211ac
mov dword [rbp + 0x1a4], eax
mov eax, dword [rbp + 0x1a4]
jmp 0x180021b4b
mov qword [rbp + 8], reloc.WLDAP32.dll_Ordinal_32
mov ecx, dword [rbp + 0x1d8]
call fcn.180022efc
mov byte [rbp + 0x64], al
mov rax, qword [rbp + 0x1d0]
mov rax, qword [rax + 0x68]
mov qword [rbp + 0x198], rax
lea rax, [rbp + 0x48]
lea rcx, [rbp + 0x65]
mov rdx, qword [rbp + 0x1d0]
add rdx, 0x74
lea r8, [rbp + 0xa8]
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x28]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x88]
mov qword [rsp + 0x20], rax
mov r9, rcx
lea r8, [rbp + 0x64]
mov rcx, qword [rbp + 0x198]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
mov dword [rbp + 0x1a0], eax
cmp dword [rbp + 0x1a0], 0
je 0x180021a8b
cmp dword [rbp + 0x1a0], 1
je 0x180021a8b
cmp dword [rbp + 0x1a0], 3
je 0x180021b08
jmp 0x180021b46
lea rax, [rbp + 0x28]
mov rcx, qword [rbp + 0xa8]
sub rcx, rax
mov rax, rcx
mov qword [rbp + 0xc8], rax
cmp qword [rbp + 0xc8], 0
jbe 0x180021ae1
mov rax, qword [rbp + 0x1d0]
mov r9, qword [rax + 0x80]
mov r8, qword [rbp + 0xc8]
mov edx, 1
lea rcx, [rbp + 0x28]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp qword [rbp + 0xc8], rax
je 0x180021ae1
call fcn.1800211ac
jmp 0x180021b4b
mov rax, qword [rbp + 0x1d0]
mov byte [rax + 0x71], 1
lea rax, [rbp + 0x64]
cmp qword [rbp + 0x88], rax
je 0x180021b01
mov eax, dword [rbp + 0x1d8]
jmp 0x180021b4b
call fcn.1800211ac
jmp 0x180021b4b
mov rax, qword [rbp + 0x1d0]
mov rdx, qword [rax + 0x80]
mov cl, byte [rbp + 0x64]
call fcn.18001b758
movzx eax, al
test eax, eax
je 0x180021b33
mov eax, dword [rbp + 0x1d8]
mov dword [rbp + 0x194], eax
jmp 0x180021b3e
call fcn.1800211ac
mov dword [rbp + 0x194], eax
mov eax, dword [rbp + 0x194]
jmp 0x180021b4b
call fcn.1800211ac
mov rdi, rax
lea rcx, [rbp - 0x40]
lea rdx, reloc.WS2_32.dll_connect
call fcn.180236ff4
mov rax, rdi
mov rcx, qword [rbp + 0x1a8]
xor rcx, rbp
call fcn.180237140
lea rsp, [rbp + 0x1b8]
pop rdi
pop rbp
ret