Function at 0x500054d0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
mov qword [rsp + 0x20], r9
push rdi
mov eax, 0x10d0
call sub.ntdll.dll___chkstk
sub rsp, rax
mov dword [rsp + 0x50], 0
mov eax, dword [rsp + 0x10e0]
and eax, 0xff
mov dword [rsp + 0x54], eax
mov qword [rsp + 0x68], 0
cmp qword [rsp + 0x10f0], 0
je 0x50005526
cmp dword [section..bss], 0
jne 0x5000552b
jmp 0x50005b70
lea rax, [rsp + 0x10f8]
mov qword [rsp + 0x88], rax
lea rax, [0x50012220]
mov ecx, 1
lock xadd dword [rax], ecx
inc ecx
mov eax, ecx
mov dword [rsp + 0x78], eax
mov eax, dword [rsp + 0x10e0]
and eax, 0x2000
test eax, eax
jne 0x500058fa
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x68], rax
mov dword [rsp + 0x58], 0
mov eax, dword [rsp + 0x10e0]
and eax, 0x400
test eax, eax
je 0x500055e4
lea rcx, [0x50012228]
call fcn.500050d0
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9b, 1
lea r8, [rsp + 0xd0]
mov edx, reloc.WS2_32.dll_recv
mov rcx, qword [0x50012228]
call fcn.50001b70
mov eax, dword [rsp + 0x58]
mov ecx, dword [rsp + 0x50]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x50]
mov byte [rsp + rax + 0xd0], 0x20
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x10e0]
and eax, 0x1000
test eax, eax
je 0x50005644
mov eax, dword [rsp + 0x50]
lea rax, [rsp + rax + 0xd0]
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x20], rcx
mov r9b, 1
mov r8, rax
mov edx, 8
mov ecx, dword [rsp + 0x78]
call fcn.50001930
mov eax, dword [rsp + 0x58]
mov ecx, dword [rsp + 0x50]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x50]
mov byte [rsp + rax + 0xd0], 0x20
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x10e0]
and eax, 0x800
test eax, eax
je 0x500056bc
mov rax, qword gs:[0x30]
mov qword [rsp + 0x90], rax
mov eax, dword [rsp + 0x50]
lea rax, [rsp + rax + 0xd0]
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x20], rcx
mov r9b, 1
mov r8, rax
mov edx, 6
mov rax, qword [rsp + 0x90]
mov ecx, dword [rax + 0x48]
call fcn.50001930
mov eax, dword [rsp + 0x58]
mov ecx, dword [rsp + 0x50]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x50]
mov byte [rsp + rax + 0xd0], 0x20
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x10e0]
and eax, 0x4000
test eax, eax
je 0x500057ae
cmp dword [rsp + 0x54], 1
jne 0x500056eb
mov eax, dword [rsp + 0x50]
mov dword [rsp + rax + 0xd0], 0x4c494146
jmp 0x5000578d
cmp dword [rsp + 0x54], 2
jne 0x50005706
mov eax, dword [rsp + 0x50]
mov dword [rsp + rax + 0xd0], 0x52525245
jmp 0x5000578d
cmp dword [rsp + 0x54], 3
jne 0x5000571e
mov eax, dword [rsp + 0x50]
mov dword [rsp + rax + 0xd0], 0x4e524157
jmp 0x5000578d
cmp dword [rsp + 0x54], 4
jne 0x50005736
mov eax, dword [rsp + 0x50]
mov dword [rsp + rax + 0xd0], 0x45544f4e
jmp 0x5000578d
cmp dword [rsp + 0x54], 5
jne 0x5000574e
mov eax, dword [rsp + 0x50]
mov dword [rsp + rax + 0xd0], 0x4f464e49
jmp 0x5000578d
cmp dword [rsp + 0x54], 6
jne 0x50005766
mov eax, dword [rsp + 0x50]
mov dword [rsp + rax + 0xd0], 0x47424544
jmp 0x5000578d
cmp dword [rsp + 0x54], 7
jne 0x5000577e
mov eax, dword [rsp + 0x50]
mov dword [rsp + rax + 0xd0], 0x45435254
jmp 0x5000578d
mov eax, dword [rsp + 0x50]
mov dword [rsp + rax + 0xd0], 0x454e4f4e
mov eax, dword [rsp + 0x50]
add eax, 4
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x50]
mov byte [rsp + rax + 0xd0], 0x20
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
cmp qword [rsp + 0x10e8], 0
je 0x50005825
mov eax, dword [rsp + 0x10e0]
and eax, 0x200
test eax, eax
je 0x50005825
jmp 0x500057e8
mov rax, qword [rsp + 0x10e8]
inc rax
mov qword [rsp + 0x10e8], rax
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x10e8]
movsx eax, byte [rax]
test eax, eax
je 0x5000580f
mov eax, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x10e8]
movzx ecx, byte [rcx]
mov byte [rsp + rax + 0xd0], cl
jmp 0x500057cb
mov eax, dword [rsp + 0x50]
mov byte [rsp + rax + 0xd0], 0x20
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
je 0x5000586e
mov eax, dword [rsp + 0x50]
mov byte [rsp + rax + 0xd0], gethostbyaddr
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x50]
mov byte [rsp + rax + 0xd0], 0x3e
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x50]
mov byte [rsp + rax + 0xd0], 0x20
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x50]
mov ecx, 0xffd
sub rcx, rax
mov rax, rcx
mov ecx, dword [rsp + 0x50]
lea rcx, [rsp + rcx + 0xd0]
mov r9, qword [rsp + 0x88]
mov r8d, eax
mov rdx, rcx
mov rcx, qword [rsp + 0x10f0]
call fcn.50003080
mov ecx, dword [rsp + 0x50]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x10e0]
and eax, 0x100
test eax, eax
je 0x500058ec
mov eax, dword [rsp + 0x50]
mov byte [rsp + rax + reloc.WS2_32.dll_listen0], 0xd
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x50]
mov byte [rsp + rax + 0xd0], 0xa
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x50]
mov byte [rsp + rax + 0xd0], 0
jmp 0x5000596f
cmp qword [rsp + 0x10e8], 0
je 0x50005916
mov eax, dword [rsp + 0x10e8]
mov qword [rsp + 0x80], rax
jmp 0x50005957
mov qword [rsp + 0x70], 0
jmp 0x5000592e
mov rax, qword [rsp + 0x70]
inc rax
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x10f0]
add rcx, rax
mov rax, rcx
movsx eax, byte [rax]
test eax, eax
je 0x5000594a
jmp 0x50005921
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 0x80]
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x10f0]
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x88], 0
cmp dword [rsp + 0x54], 0
je 0x50005993
mov eax, dword [reloc.WS2_32.dll_htons]
cmp dword [rsp + 0x54], eax
jl 0x50005993
jmp 0x50005b70
mov eax, dword [section..bss]
and eax, 4
test eax, eax
je 0x500059c4
mov rax, qword [0x50017098]
mov qword [rsp + 0x98], rax
mov r8d, dword [rsp + 0x54]
mov edx, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x68]
call qword [rsp + 0x98]
mov eax, dword [section..bss]
and eax, 1
test eax, eax
je 0x50005ac2
cmp qword [0x50012008], 0
jne 0x50005a3d
mov eax, dword [section..bss]
and eax, 8
test eax, eax
je 0x500059f6
mov dword [rsp + 0x60], 3
jmp 0x500059fe
mov dword [rsp + 0x60], 5
lea rax, [0x50012008]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x40
mov eax, dword [rsp + 0x60]
mov dword [rsp + 0x20], eax
mov r9d, 3
mov r8d, 0x80
mov edx, 4
lea rcx, [0x50012010]
call fcn.50002d10
mov dword [rsp + 0x5c], eax
jmp 0x50005a45
mov dword [rsp + 0x5c], 0
cmp dword [rsp + 0x5c], 0
jne 0x50005ac2
lea rax, [rsp + 0xa0]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb byte [rdi], al
lea rax, [rsp + 0xb0]
mov rdi, rax
xor eax, eax
mov ecx, reloc.WS2_32.dll_recv
rep stosb byte [rdi], al
mov qword [rsp + 0x40], 0
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x38], rax
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [0x50012008]
call qword [sym.imp.ntdll.dll_NtWriteFile]
mov dword [rsp + 0x5c], eax
mov eax, dword [section..bss]
and eax, 2
test eax, eax
je 0x50005b70
lea rax, [rsp + 0xc0]
mov rdi, rax
xor eax, eax
mov ecx, reloc.WS2_32.dll_recv
rep stosb byte [rdi], al
cmp qword [0x50012218], 0
jne 0x50005b1d
mov rax, qword gs:[0x30]
mov qword [rsp + 0xa8], rax
mov rax, qword [rsp + 0xa8]
mov rax, qword [rax + 0x60]
mov rax, qword [rax + 0x20]
mov rax, qword [rax + 0x28]
mov qword [0x50012218], rax
cmp dword [0x50012218], 7
je 0x50005b70
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [0x50012218]
call qword [sym.imp.ntdll.dll_NtWriteFile]
mov dword [rsp + 0x5c], eax
add rsp, 0x10d0
pop rdi
ret