Function at 0x40a8b0
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x4238
call fcn.0040cde0
mov eax, dword [0x41e260]
push ebx
mov ebx, dword [esp + 0x424c]
cmp ebx, 3
push esi
mov dword [esp + 0x423c], eax
push edi
mov esi, ecx
je 0x40a906
cmp ebx, 2
je 0x40a9dc
cmp ebx, 1
je 0x40a9dc
pop edi
pop esi
mov eax, 0x10000
pop ebx
mov ecx, dword [esp + 0x4234]
call fcn.0040bdf8
add esp, 0x4238
ret 0x10
mov eax, dword [esi + 4]
mov edi, dword [esp + 0x4248]
cmp edi, eax
je 0x40a969
cmp eax, 0xffffffff
je 0x40a924
mov eax, dword [esi]
push eax
call fcn.004085b0
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x40a8e9
cmp edi, dword [eax + 0x10]
jge 0x40a940
push eax
call fcn.004082f0
add esp, 4
mov ecx, dword [esi]
cmp dword [ecx + 0x10], edi
jge 0x40a95b
mov edx, dword [esi]
push edx
call fcn.00408340
mov eax, dword [esi]
mov ecx, dword [eax + 0x10]
add esp, 4
cmp ecx, edi
jl 0x40a947
mov ecx, dword [esi]
push ecx
call fcn.0040a4e0
add esp, 4
mov dword [esi + 4], edi
mov edx, dword [esp + 0x4250]
mov eax, dword [esp + 0x424c]
mov ecx, dword [esi]
push edx
push eax
push ecx
call fcn.0040a600
mov edi, eax
add esp, 0xc
test edi, edi
jle 0x40a9a7
pop edi
pop esi
mov eax, 0x600
pop ebx
mov ecx, dword [esp + 0x4234]
call fcn.0040bdf8
add esp, 0x4238
ret 0x10
mov edx, dword [esi]
push edx
call fcn.004085b0
add esp, 4
mov eax, edi
neg eax
pop edi
mov dword [esi + 4], 0xffffffff
sbb eax, eax
pop esi
and eax, 0x5000000
pop ebx
mov ecx, dword [esp + 0x4234]
call fcn.0040bdf8
add esp, 0x4238
ret 0x10
mov eax, dword [esi + 4]
or edi, 0xffffffff
cmp eax, edi
je 0x40a9f1
mov eax, dword [esi]
push eax
call fcn.004085b0
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], edi
mov edi, dword [esp + 0x4248]
cmp edi, dword [eax + 4]
jge 0x40a8e9
cmp edi, dword [eax + 0x10]
jge 0x40aa14
push eax
call fcn.004082f0
add esp, 4
mov ecx, dword [esi]
cmp dword [ecx + 0x10], edi
jge 0x40aa34
jmp 0x40aa20
mov edx, dword [esi]
push edx
call fcn.00408340
mov eax, dword [esi]
mov ecx, dword [eax + 0x10]
add esp, 4
cmp ecx, edi
jl 0x40aa20
lea ecx, [esp + 0x114]
push ecx
push edi
mov ecx, esi
call fcn.004086b0
test byte [esp + 0x21c], 0x10
je 0x40aa68
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x4234]
call fcn.0040bdf8
add esp, 0x4238
ret 0x10
cmp ebx, 1
mov edi, dword [esp + 0x424c]
push ebp
je 0x40ab3c
mov al, byte [edi]
test al, al
mov ebx, edi
mov ecx, edi
je 0x40ab16
cmp al, 0x2f
je 0x40aa8f
cmp al, 0x5c
jne 0x40aa92
lea ebx, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x40aa87
cmp ebx, edi
je 0x40ab16
lea edx, [esp + 0x14]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40aaa6
sub ebx, edi
mov byte [esp + ebx + 0x13], cl
mov al, byte [esp + 0x14]
cmp al, 0x2f
je 0x40aacd
cmp al, 0x5c
je 0x40aacd
cmp byte [esp + 0x15], 0x3a
je 0x40aacd
xor bl, bl
jmp 0x40aacf
mov bl, 1
lea edx, [esp + 0x14]
push 0x419ee4
push edx
call fcn.0040ca2b
mov ebp, eax
lea eax, [esp + 0x1c]
push 0x419ee0
push eax
call fcn.0040ca2b
add esp, 0x10
test eax, eax
setne cl
test ebp, ebp
setne dl
or cl, dl
or cl, bl
jne 0x40ab16
lea eax, [esp + 0x14]
push eax
lea ecx, [esi + 0x138]
push ecx
call fcn.00408b00
add esp, 8
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push edi
mov dword [esp + 0x23c], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40ab4b
mov eax, 0x200
jmp 0x40ac05
mov edx, dword [esi]
push edx
call fcn.0040a4e0
mov ecx, dword [esi]
push 0x4000
lea eax, [esp + 0x24c]
push eax
push ecx
xor bl, bl
call fcn.0040a600
add esp, 0x10
test eax, eax
jl 0x40abac
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x40abae
push 0
lea edx, [esp + 0x14]
push edx
push eax
lea eax, [esp + 0x250]
push eax
push edi
call ebp
test eax, eax
je 0x40abac
mov edx, dword [esi]
push 0x4000
lea ecx, [esp + 0x248]
push ecx
push edx
call fcn.0040a600
add esp, 0xc
test eax, eax
jge 0x40ab77
mov bl, 1
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x40abdd
test bl, bl
jne 0x40abdd
lea eax, [esp + 0x234]
push eax
lea ecx, [esp + 0x228]
push ecx
lea edx, [esp + 0x234]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [esp + 0x4258], 1
je 0x40abee
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi]
push eax
call fcn.004085b0
add esp, 4
neg bl
sbb ebx, ebx
and ebx, 0x400
mov eax, ebx
mov ecx, dword [esp + 0x4244]
pop ebp
pop edi
pop esi
pop ebx
call fcn.0040bdf8
add esp, 0x4238
ret 0x10