Function at 0x4592dc
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], esi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ecx
mov ebx, edx
mov edi, eax
mov dword [ebp - 0x20], 0xc
xor esi, esi
mov dword [ebp - 0x1c], esi
push esi
mov dword [ebp - 0x18], esi
lea ecx, [ebp - 0x20]
push 0x80
push 2
push ecx
push esi
push 0xc0000000
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4594f5
lea ecx, [ebp - 0x14]
push 0
push ecx
push 0xe
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x459478
mov ecx, dword [ebp - 0x14]
cmp ecx, 0xe
je 0x459365
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffef
call fcn.004581b8
pop ecx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
xor eax, eax
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x14]
push 0
push ecx
push 0x28
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x459461
mov ecx, dword [ebp - 0x14]
cmp ecx, 0x28
jne 0x459443
movzx ecx, word [ebx + 0xe]
cmp ecx, 1
je 0x45948f
cmp ecx, 4
je 0x45948f
cmp ecx, 8
je 0x45948f
cmp ecx, 0x10
je 0x4593d5
cmp ecx, 0x18
je 0x4593d5
cmp ecx, 0x20
je 0x4593d5
push 0xfffffffffffffffd
call fcn.004581b8
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
xor eax, eax
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 4]
lea ecx, [ebp - 0x14]
push 0
push ecx
push dword [ebx + 0x14]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x45942c
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebx + 0x14]
je 0x459413
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffef
call fcn.004581b8
pop ecx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
xor eax, eax
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov eax, 1
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffef
call fcn.004581b8
pop ecx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
xor eax, eax
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffef
call fcn.004581b8
pop ecx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
xor eax, eax
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffef
call fcn.004581b8
pop ecx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
xor eax, eax
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffef
call fcn.004581b8
pop ecx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
xor eax, eax
mov esp, ebp
pop ebp
ret
mov edi, 1
shl edi, cl
test edi, edi
je 0x4593d5
lea ecx, [ebp - 0x14]
push 0
push ecx
shl edi, 2
push edi
lea eax, [ebx + 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4594de
cmp edi, dword [ebp - 0x14]
je 0x4593d5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffef
call fcn.004581b8
pop ecx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
xor eax, eax
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffef
call fcn.004581b8
pop ecx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
xor eax, eax
mov esp, ebp
pop ebp
ret
push 0xfffffffffffffff0
call fcn.004581b8
pop ecx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
xor eax, eax
mov esp, ebp
pop ebp
ret