Function at 0x1004719
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2a0
mov eax, dword [0x1020204]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
xor eax, eax
cmp esi, eax
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x2a0], esi
mov dword [ebp - 0x294], eax
je 0x10047b4
cmp byte [esi], al
je 0x10047b4
cmp ebx, eax
je 0x10047b4
push eax
push eax
push 2
push eax
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x27c], eax
jne 0x10047c7
push esi
push 0x1001658
lea eax, [ebp - 0x270]
push 0x26c
push eax
call fcn.010161e1
add esp, 0x10
push 1
call fcn.0100db6b
push 0x10
push 0x1001574
lea eax, [ebp - 0x270]
push eax
push dword [0x1021df0]
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call fcn.0100db6b
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01015dd4
leave
ret 0x10
cmp dword [ebx + 8], 0
jne 0x10047d3
push ebx
call fcn.01004238
push edi
call fcn.0100b8e5
push eax
mov dword [ebp - 0x280], eax
call fcn.0100523d
test eax, eax
mov dword [ebp - 0x274], eax
jne 0x10047fd
push dword [ebp - 0x27c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10047b4
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x28c], edi
and dword [ebp - 0x28c], 0x20
mov eax, 0x1001552
mov dword [ebp - 0x278], 0x100164c
jne 0x1004824
mov dword [ebp - 0x278], eax
mov dword [ebp - 0x290], edi
and dword [ebp - 0x290], 0x10
mov esi, 0x1001640
jne 0x100483a
mov esi, eax
mov dword [ebp - 0x298], edi
and dword [ebp - 0x298], 8
mov edx, 0x1001634
jne 0x1004850
mov edx, eax
mov dword [ebp - 0x284], edi
and dword [ebp - 0x284], 4
mov ecx, 0x1001628
jne 0x1004866
mov ecx, eax
mov dword [ebp - 0x29c], edi
and dword [ebp - 0x29c], 1
je 0x100487a
mov eax, 0x100161c
push dword [ebp - 0x278]
push esi
push edx
push ecx
push eax
push dword [ebx + 0x1c]
lea eax, [ebp - 0x270]
push dword [ebp - 0x274]
push 0x10015f0
push 0x26c
push eax
call fcn.010161e1
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 0x28
push 0
lea eax, [ebp - 0x288]
push eax
lea eax, [ebp - 0x270]
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
lea eax, [ebp - 0x270]
push eax
push dword [ebp - 0x27c]
call edi
push dword [ebp - 0x274]
push dword [ebp - 0x280]
call fcn.010052f7
push dword [ebx + 8]
call fcn.010182e3
jmp 0x1004a1b
push dword [ebp - 0x278]
mov ebx, 0x10014dc
mov dword [ebp - 0x274], ebx
call fcn.0100a9f4
dec eax
je 0x1004983
sub eax, 6
je 0x100496a
dec eax
je 0x100491f
dec eax
je 0x1004951
dec eax
je 0x1004938
dec eax
je 0x100496a
dec eax
jne 0x1004996
cmp dword [ebp - 0x298], 0
je 0x1004a10
mov dword [ebp - 0x274], 0x10015e8
jmp 0x1004996
cmp dword [ebp - 0x28c], 0
je 0x1004a10
mov dword [ebp - 0x274], 0x10015e0
jmp 0x1004996
cmp dword [ebp - 0x290], 0
je 0x1004a10
mov dword [ebp - 0x274], 0x10015d8
jmp 0x1004996
cmp dword [ebp - 0x284], 0
je 0x1004a10
mov dword [ebp - 0x274], 0x10015d0
jmp 0x1004996
cmp dword [ebp - 0x29c], 0
je 0x1004a10
mov dword [ebp - 0x274], ebx
push dword [ebp - 0x278]
call fcn.0100a9c5
jmp 0x1004a0a
push ebx
call fcn.0100b8e5
mov dword [ebp - 0x280], eax
push 0
lea eax, [ebp - 0x288]
push eax
push dword [ebp - 0x274]
call esi
push eax
push dword [ebp - 0x274]
push dword [ebp - 0x27c]
call edi
push 0
lea eax, [ebp - 0x288]
push eax
push dword [ebp - 0x280]
call esi
push eax
push dword [ebp - 0x280]
push dword [ebp - 0x27c]
call edi
push dword [ebp - 0x278]
inc dword [ebp - 0x294]
call fcn.0100b8e5
cmp ebx, eax
je 0x1004a10
push ebx
call fcn.01018340
mov ebx, eax
test ebx, ebx
jne 0x10049a3
push dword [ebp - 0x278]
call fcn.01018340
test eax, eax
mov dword [ebp - 0x278], eax
jne 0x10048f2
push dword [ebp - 0x294]
lea eax, [ebp - 0x270]
push 0x10015b8
push 0x26c
push eax
call fcn.010161e1
add esp, 0x10
push 0
lea eax, [ebp - 0x288]
push eax
lea eax, [ebp - 0x270]
push eax
call esi
push eax
lea eax, [ebp - 0x270]
push eax
push dword [ebp - 0x27c]
call edi
push dword [ebp - 0x27c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x2a0]
jmp 0x10047b6