Function at 0x10004710
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [str.netuser_n]
mov ecx, dword [0x10045bc8]
mov dx, word [0x10045bcc]
push ebx
xor ebx, ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], ecx
mov word [ebp - 0x18], dx
cmp dword [ebp + 8], ebx
je 0x100048e2
push esi
push edi
mov edx, dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
push 0xffffffffffffffff
push 0x3e8
push edx
push 1
push 0
call dword [sym.imp.NETAPI32.dll_NetQueryDisplayInformation]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x10004772
cmp eax, 0xea
jne 0x10004857
mov ebx, dword [ebp - 8]
lea eax, [ebp - 0x20]
lea edx, [eax + 1]
jmp 0x10004780
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10004780
mov edi, dword [ebp - 4]
inc edi
imul edi, edi, 0x64
sub eax, edx
add edi, eax
mov esi, 0
je 0x100047c7
lea eax, [edi + 0x13]
and eax, 0xfffffff0
push eax
push 8
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x100047c7
mov eax, dword [ebp - 0x10]
push eax
push 0
push esi
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x10], esi
test esi, esi
je 0x100048e9
lea eax, [ebp - 0x20]
mov edx, esi
mov ecx, eax
sub edx, ecx
jmp 0x100047e0
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x100047e0
cmp dword [ebp - 4], 0
je 0x10004821
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100047f5
sub eax, edx
mov edx, dword [ebx]
push edx
push 0x10045bd0
add eax, esi
push edi
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
mov eax, dword [ebx + 0x14]
add esp, 0x10
add ebx, 0x18
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
jne 0x100047f0
dec esi
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x10004822
mov cx, word [0x10045b88]
mov word [esi], cx
mov dl, byte [0x10045b8a]
mov byte [esi + 2], dl
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.NETAPI32.dll_NetApiBufferFree]
cmp dword [ebp - 0x14], 0xea
mov ebx, dword [ebp - 0x10]
je 0x10004743
mov eax, ebx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10004860
sub eax, edx
mov esi, eax
mov dword [ebp - 0x14], 0
test ebx, ebx
je 0x100048e0
test esi, esi
je 0x100048be
mov edx, dword [ebp + 8]
push 1
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push esi
mov edi, eax
mov eax, dword [ebp + 8]
push 0
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockFile]
mov edx, dword [ebp + 8]
push 0
lea ecx, [ebp - 0x14]
push ecx
push esi
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
push 0
push esi
push 0
push edi
push eax
call dword [sym.imp.KERNEL32.dll_UnlockFile]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x100048e0
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.NETAPI32.dll_NetApiBufferFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4