Function at 0x4058b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1f80
call fcn.00409a60
mov eax, dword [0x46f20c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push 0
push 0x80
push 2
push 0
push 0
mov dword [ebp - 0x1f4c], eax
mov eax, dword [ebp + 0xc]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x1f54], ebx
cmp ebx, 0xffffffff
jne 0x40590b
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409118
mov esp, ebp
pop ebp
ret
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x1f48]
push 0
push eax
push 2
lea eax, [ebp - 0x1f50]
mov dword [ebp - 0x1f50], 0xfeff
push eax
push ebx
call edi
mov dword [ebp - 0x1f78], 0
nop dword [eax]
push 0
lea eax, [ebp - 0x1f48]
push eax
push 2
push 0x461108
push ebx
call edi
mov eax, dword [ebp - 0x1f78]
shl eax, 4
mov edx, dword [eax + 0x46f140]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405967
sub ecx, esi
lea eax, [ebp - 0x1f48]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
push edx
push ebx
call edi
push 0
lea eax, [ebp - 0x1f48]
push eax
push 4
push 0x46110c
push ebx
call edi
mov eax, dword [ebp - 0x1f78]
inc eax
mov dword [ebp - 0x1f78], eax
cmp eax, 8
jb 0x405940
push 0
lea eax, [ebp - 0x1f48]
push eax
push 4
push 0x461114
push ebx
call edi
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0
push 0x1004
push dword [ebp - 0x1f4c]
call esi
mov dword [ebp - 0x1f58], eax
mov dword [ebp - 0x1f7c], 0
test eax, eax
jle 0x405b43
nop
mov dword [ebp - 0x1f80], 1
mov dword [ebp - 0x1f78], 0
nop dword [eax]
nop dword [eax + eax]
lea eax, [ebp - 0x1f44]
mov dword [ebp - 0x1f68], 0xfa0
mov dword [ebp - 0x1f6c], eax
lea eax, [ebp - 0x1f80]
push eax
push 0
push 0x104b
push dword [ebp - 0x1f4c]
call esi
test eax, eax
jne 0x405a49
mov word [ebp - 0x1f44], ax
jmp 0x405a50
mov ax, word [ebp - 0x1f44]
xor esi, esi
test ax, ax
je 0x405aa7
lea edx, [ebp - 0x1f44]
movzx edi, ax
xor ecx, ecx
lea ebx, [esi + 0x20]
cmp di, 0x2c
jne 0x405a85
cmp word [ebp + ecx - 0x1f42], bx
jne 0x405a85
mov eax, 0xa
mov word [edx], bx
mov word [ebp + ecx - 0x1f42], ax
inc esi
lea edx, [ebp - 0x1f44]
lea ecx, [esi + esi]
add edx, ecx
movzx eax, word [edx]
mov edi, eax
test ax, ax
jne 0x405a65
mov ebx, dword [ebp - 0x1f54]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x1f48]
push eax
push 2
push 0x461108
push ebx
call edi
lea eax, [ebp - 0x1f44]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405ac3
sub eax, edx
lea ecx, [ebp - 0x1f48]
push 0
sar eax, 1
push ecx
add eax, eax
push eax
lea eax, [ebp - 0x1f44]
push eax
push ebx
call edi
push 0
lea eax, [ebp - 0x1f48]
push eax
push 4
push 0x46110c
push ebx
call edi
mov eax, dword [ebp - 0x1f78]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
inc eax
mov dword [ebp - 0x1f78], eax
cmp eax, 8
jb 0x405a10
push 0
lea eax, [ebp - 0x1f48]
push eax
push 4
push 0x461114
push ebx
call edi
mov eax, dword [ebp - 0x1f7c]
inc eax
mov dword [ebp - 0x1f7c], eax
cmp eax, dword [ebp - 0x1f58]
jl 0x4059f0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409118
mov esp, ebp
pop ebp
ret