Function at 0x4185e4
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [0x42e4e4]
sub esp, 0x14
push ebx
push ebp
push esi
push edi
xor edi, edi
cmp eax, edi
je 0x41888a
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenW]
xor ebx, ebx
cmp dword [0x42e4e0], edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], edi
jle 0x4186c7
mov esi, 0x204
cmp dword [esi + eax], edi
lea ecx, [esi + eax - 0x204]
je 0x4186ad
cmp esi, 0x204
je 0x418647
push ecx
call ebp
lea eax, [ebx + eax + 4]
mov dword [esp + 0x1c], eax
mov eax, dword [0x42e4e4]
mov ebx, dword [esp + 0x1c]
cmp dword [esi + eax + 4], edi
mov dword [esp + 0x10], edi
jle 0x4186a7
mov edx, dword [esi + eax]
lea ecx, [esi + eax]
cmp word [edx + edi], 0
je 0x418691
mov eax, edx
add eax, edi
push eax
call ebp
add ebx, eax
mov eax, dword [0x42e4e4]
mov ecx, dword [esi + eax]
add ecx, edi
cmp dword [ecx + 0x208], 0
jne 0x41868f
mov ecx, dword [ecx + 0x204]
inc ebx
test ecx, ecx
je 0x41868f
push ecx
call ebp
add ebx, eax
mov eax, dword [0x42e4e4]
inc ebx
inc ebx
inc dword [esp + 0x10]
add edi, 0x20c
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esi + eax + 4]
jl 0x418651
xor edi, edi
inc ebx
inc ebx
mov dword [esp + 0x1c], ebx
inc dword [esp + 0x14]
add esi, 0x210
mov ecx, dword [esp + 0x14]
cmp ecx, dword [0x42e4e0]
jl 0x41861b
lea eax, [ebx + ebx + 4]
push eax
call fcn.00415a3c
cmp eax, edi
pop ecx
mov dword [esp + 0x18], eax
je 0x41888a
or byte [eax], 0xff
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], edi
mov byte [eax + 1], 0xfe
mov eax, dword [esp + 0x18]
cmp dword [0x42e4e0], edi
lea esi, [eax + 2]
jle 0x418816
mov edi, 0x204
mov eax, dword [0x42e4e4]
cmp dword [edi + eax], 0
je 0x4187fa
cmp edi, 0x204
je 0x418752
mov word [esi], 0x5b
mov eax, dword [0x42e4e4]
inc esi
lea eax, [edi + eax - 0x204]
inc esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
call ebp
lea esi, [esi + eax*2]
mov word [esi], 0x5d
inc esi
inc esi
mov word [esi], 0xd
inc esi
inc esi
mov word [esi], 0xa
inc esi
inc esi
mov eax, dword [0x42e4e4]
and dword [esp + 0x10], 0
cmp dword [edi + eax + 4], 0
jle 0x4187ec
xor ebx, ebx
mov ecx, dword [eax + edi]
add eax, edi
cmp word [ecx + ebx], 0
je 0x4187cf
mov eax, ecx
add eax, ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
call ebp
lea esi, [esi + eax*2]
mov eax, dword [0x42e4e4]
mov eax, dword [edi + eax]
cmp dword [eax + ebx + 0x208], 0
jne 0x4187c1
mov word [esi], 0x3d
mov eax, dword [0x42e4e4]
inc esi
mov eax, dword [edi + eax]
inc esi
mov eax, dword [eax + ebx + 0x204]
test eax, eax
je 0x4187c1
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
call ebp
lea esi, [esi + eax*2]
mov word [esi], 0xd
inc esi
inc esi
mov word [esi], 0xa
inc esi
inc esi
inc dword [esp + 0x10]
mov eax, dword [0x42e4e4]
mov ecx, dword [esp + 0x10]
add ebx, 0x20c
cmp ecx, dword [edi + eax + 4]
jl 0x418769
mov ebx, dword [esp + 0x1c]
mov word [esi], 0xd
inc esi
inc esi
mov word [esi], 0xa
inc esi
inc esi
inc dword [esp + 0x14]
add edi, 0x210
mov eax, dword [esp + 0x14]
cmp eax, dword [0x42e4e0]
jl 0x418705
xor edi, edi
push edi
push 0x80
push 2
push edi
push edi
push 0xc0000000
push dword [esp + 0x40]
mov word [esi], di
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, edi
je 0x41887f
cmp esi, 0xffffffff
je 0x41887f
lea eax, [esp + 0x20]
push edi
push eax
lea eax, [ebx + ebx + 2]
push eax
push dword [esp + 0x24]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
lea eax, [esp + 0x18]
push eax
jne 0x418864
call fcn.00415a56
pop ecx
jmp 0x418874
call fcn.00415a56
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push 1
pop edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x41888c
lea eax, [esp + 0x18]
push eax
call fcn.00415a56
pop ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret