Function at 0x402480
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x91c
mov ecx, 5
xor eax, eax
lea edx, [esp + 0x20]
push ebx
push ebp
push esi
push edi
mov esi, str.SPLITCIL1
lea edi, [esp + 0x1c]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x930]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x2e
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
push ecx
call fcn.00402e80
add esp, 8
test eax, eax
je 0x4024d8
mov byte [eax], 0
mov edi, str..cil
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x8000080
push 2
mov ecx, ebx
push eax
push eax
and ecx, 3
lea eax, [esp + 0x44]
push 0xc0000000
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x402563
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x402545
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x402547
xor esi, esi
lea ecx, [esp + 0x30]
push ecx
push 5
call fcn.00401740
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x91c
ret
lea edx, [esp + 0x14]
lea eax, [esp + 0x934]
push edx
push 0
push 0
push eax
call fcn.00402140
mov esi, eax
mov eax, dword [esp + 0x24]
add esp, 0x10
test eax, eax
jne 0x40258a
test esi, esi
jge 0x402563
test esi, esi
jl 0x402924
mov ecx, dword [esp + 0x938]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
dec ecx
mov dword [esp + 0x18], ecx
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x934]
cmp eax, edx
jae 0x402924
lea eax, [esp + 0x14]
lea ecx, [esp + 0x15c]
push eax
push 0x3e8
lea edx, [esp + 0x93c]
push ecx
push edx
call fcn.00402140
mov esi, eax
mov eax, dword [esp + 0x24]
add esp, 0x10
test eax, eax
jne 0x40291c
test esi, esi
jl 0x40280c
lea eax, [esp + 0x10]
push 0
lea ecx, [esp + 0x20]
push eax
push ecx
call fcn.00403f20
add esp, 4
lea edx, [eax + eax + 2]
lea eax, [esp + 0x24]
push edx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [esp + 0x1c]
push ecx
call fcn.00403f20
lea edx, [eax + eax + 2]
mov eax, dword [esp + 0x14]
add esp, 4
cmp eax, edx
je 0x402647
call ebp
test eax, eax
je 0x402645
call ebp
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x402647
xor esi, esi
test esi, esi
jl 0x40280c
lea eax, [esp + 0x15c]
push eax
push ebx
call fcn.00402370
mov esi, eax
add esp, 8
test esi, esi
jl 0x40280c
lea ecx, [esp + 0x15c]
push 0x3a
push ecx
call fcn.00404140
add esp, 8
lea edx, [esp + 0x15c]
mov edi, eax
push 0x5c
push edx
add edi, 2
call fcn.00404140
add eax, 2
add esp, 8
cmp eax, edi
jbe 0x4026a6
lea eax, [esp + 0x15c]
push 0x5c
push eax
jmp 0x4026b0
lea ecx, [esp + 0x15c]
push 0x3a
push ecx
call fcn.00404140
add eax, 2
lea edx, [esp + 0x164]
add esp, 8
cmp eax, edx
jbe 0x402728
lea eax, [esp + 0x15c]
push 0x3a
push eax
call fcn.00404140
add esp, 8
lea ecx, [esp + 0x15c]
mov edi, eax
push 0x5c
push ecx
add edi, 2
call fcn.00404140
add eax, 2
add esp, 8
cmp eax, edi
jbe 0x40270f
lea edx, [esp + 0x15c]
push 0x5c
push edx
call fcn.00404140
mov edi, eax
add esp, 8
add edi, 2
jmp 0x40272f
lea eax, [esp + 0x15c]
push 0x3a
push eax
call fcn.00404140
mov edi, eax
add esp, 8
add edi, 2
jmp 0x40272f
lea edi, [esp + 0x15c]
lea ecx, [esp + 0x10]
push 0
push ecx
push edi
call fcn.00403f20
add esp, 4
lea edx, [eax + eax + 2]
push edx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call fcn.00403f20
mov ecx, dword [esp + 0x14]
lea eax, [eax + eax + 2]
add esp, 4
cmp ecx, eax
je 0x40277b
call ebp
test eax, eax
je 0x402779
call ebp
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x40277b
xor esi, esi
test esi, esi
jl 0x40280c
lea ecx, [esp + 0x14]
lea edx, [esp + 0x15c]
push ecx
push 0x3e8
lea eax, [esp + 0x93c]
push edx
push eax
call fcn.00402140
add esp, 0x10
lea ecx, [esp + 0x10]
lea edx, [esp + 0x15c]
mov esi, eax
push 0
push ecx
push edx
call fcn.00403f20
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
add esp, 4
lea eax, [eax + eax + 2]
lea ecx, [esp + 0x164]
push eax
push ecx
push ebx
call edi
lea edx, [esp + 0x15c]
push edx
call fcn.00403f20
mov ecx, dword [esp + 0x14]
lea eax, [eax + eax + 2]
add esp, 4
cmp ecx, eax
je 0x402812
call ebp
test eax, eax
je 0x402808
call ebp
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x402812
xor esi, esi
jmp 0x402812
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
test esi, esi
jl 0x402924
lea ecx, [esp + 0x14]
lea edx, [esp + 0x15c]
push ecx
push 0x3e8
lea eax, [esp + 0x93c]
push edx
push eax
call fcn.00402140
add esp, 0x10
lea ecx, [esp + 0x10]
lea edx, [esp + 0x15c]
mov esi, eax
push 0
push ecx
push edx
call fcn.00403f20
add esp, 4
lea eax, [eax + eax + 2]
lea ecx, [esp + 0x164]
push eax
push ecx
push ebx
call edi
lea edx, [esp + 0x15c]
push edx
call fcn.00403f20
mov ecx, dword [esp + 0x14]
lea eax, [eax + eax + 2]
add esp, 4
cmp ecx, eax
je 0x40289b
call ebp
test eax, eax
je 0x402899
call ebp
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x40289b
xor esi, esi
test esi, esi
jl 0x402924
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4028b5
test esi, esi
jge 0x40281a
jmp 0x40291c
lea ecx, [esp + 0x10]
push 0
lea edx, [esp + 0x160]
push ecx
push edx
mov word [esp + 0x168], 0
call fcn.00403f20
add esp, 4
lea eax, [eax + eax + 2]
lea ecx, [esp + 0x164]
push eax
push ecx
push ebx
call edi
lea edx, [esp + 0x15c]
push edx
call fcn.00403f20
mov ecx, dword [esp + 0x14]
lea eax, [eax + eax + 2]
add esp, 4
cmp ecx, eax
je 0x40291c
call ebp
test eax, eax
je 0x40291a
call ebp
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x40291c
xor esi, esi
test esi, esi
jge 0x4025a4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x91c
ret