Function at 0x40e030
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x434c
call fcn.00518ed0
mov eax, dword [0x58bc40]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov ebx, ecx
or esi, 0xffffffff
push edi
mov dword [ebp - 0x434c], ebx
mov dword [ebp - 0x4348], eax
cmp dword [ebx + 4], esi
je 0x40e06a
mov edi, dword [ebx]
call fcn.0040d840
mov edi, dword [ebp + 8]
mov dword [ebx + 4], esi
mov esi, dword [ebx]
cmp edi, dword [esi + 4]
jl 0x40e08f
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00513700
mov esp, ebp
pop ebp
ret 8
cmp edi, dword [esi + 0x10]
jge 0x40e099
call fcn.0040d2b0
mov ecx, dword [ebx]
cmp dword [ecx + 0x10], edi
jge 0x40e0ed
mov esi, dword [ebx]
test esi, esi
je 0x40e0e6
cmp dword [esi + 0x18], 0
je 0x40e0e6
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x40e0e6
mov edx, dword [esi + 0x50]
add edx, dword [esi + 0x4c]
mov ecx, dword [esi + 0x48]
push 0
mov dword [esi + 0x10], eax
lea edx, [edx + ecx + 0x2e]
add dword [esi + 0x14], edx
push 0
lea eax, [esi + 0x78]
push eax
lea ecx, [esi + 0x28]
push ecx
mov eax, esi
call fcn.0040ceb0
add esp, 0x10
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov edx, dword [ebx]
cmp dword [edx + 0x10], edi
jl 0x40e0a0
push edi
lea edx, [ebp - 0x4340]
mov ecx, ebx
call fcn.0040d8d0
test byte [ebp - 0x4238], 0x10
je 0x40e140
lea eax, [ebp - 0x433c]
push eax
lea esi, [ebp - 0x210]
call fcn.0040c800
add esp, 4
mov ecx, esi
push ecx
add ebx, 0x138
push ebx
call fcn.0040df30
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00513700
mov esp, ebp
pop ebp
ret 8
mov edi, dword [ebp - 0x4348]
movzx eax, word [edi]
mov esi, edi
mov ecx, edi
test ax, ax
je 0x40e21c
cmp ax, 0x2f
je 0x40e162
cmp ax, 0x5c
jne 0x40e165
lea esi, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x40e156
cmp esi, edi
je 0x40e21c
lea edx, [ebp - 0x210]
mov eax, edi
sub edx, edi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40e183
sub esi, edi
sar esi, 1
xor edx, edx
mov word [ebp + esi*2 - 0x212], dx
mov ax, word [ebp - 0x210]
cmp ax, 0x2f
je 0x40e1c1
cmp ax, 0x5c
je 0x40e1c1
cmp word [ebp - 0x20e], 0x3a
je 0x40e1c1
xor bl, bl
jmp 0x40e1c3
mov bl, 1
lea eax, [ebp - 0x210]
push 0x569918
push eax
call fcn.00514464
lea ecx, [ebp - 0x210]
push 0x569920
push ecx
mov esi, eax
call fcn.00514464
add esp, 0x10
test eax, eax
setne dl
test esi, esi
setne al
or dl, al
or dl, bl
jne 0x40e216
mov edx, dword [ebp - 0x434c]
lea ecx, [ebp - 0x210]
push ecx
add edx, 0x138
push edx
call fcn.0040df30
add esp, 8
mov ebx, dword [ebp - 0x434c]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40e254
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00513700
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx]
call fcn.0040d5a0
lea eax, [ebp - 0x4210]
push eax
mov eax, dword [ebx]
mov ecx, 0x4000
mov byte [ebp - 0x4341], 0
call fcn.0040d6b0
add esp, 4
test eax, eax
js 0x40e2b6
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x40e2bd
push 0
lea ecx, [ebp - 0x4348]
push ecx
push eax
lea edx, [ebp - 0x4210]
push edx
push esi
call edi
test eax, eax
je 0x40e2b6
lea eax, [ebp - 0x4210]
push eax
mov eax, dword [ebx]
mov ecx, 0x4000
call fcn.0040d6b0
add esp, 4
test eax, eax
jns 0x40e282
mov byte [ebp - 0x4341], 1
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x40e2ee
cmp byte [ebp - 0x4341], 0
jne 0x40e2ee
lea ecx, [ebp - 0x4224]
push ecx
lea edx, [ebp - 0x4234]
push edx
lea eax, [ebp - 0x422c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebx]
call fcn.0040d840
movzx eax, byte [ebp - 0x4341]
mov ecx, dword [ebp - 4]
neg eax
pop edi
sbb eax, eax
pop esi
xor ecx, ebp
and eax, 0x400
pop ebx
call fcn.00513700
mov esp, ebp
pop ebp
ret 8