Function at 0x407ed0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4250
call fcn.0040ebb0
mov eax, dword [0x41a024]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
or esi, 0xffffffff
push edi
mov dword [ebp - 0x424c], eax
cmp dword [ebx + 4], esi
je 0x407f05
mov edi, dword [ebx]
call fcn.004076b0
mov edi, dword [ebp + 0xc]
mov dword [ebx + 4], esi
mov esi, dword [ebx]
cmp edi, dword [esi + 4]
jl 0x407f2a
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004082f3
mov esp, ebp
pop ebp
ret 0xc
cmp edi, dword [esi + 0x10]
jge 0x407f34
call fcn.00407110
mov ecx, dword [ebx]
cmp dword [ecx + 0x10], edi
jge 0x407f8d
jmp 0x407f40
mov esi, dword [ebx]
test esi, esi
je 0x407f86
cmp dword [esi + 0x18], 0
je 0x407f86
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x407f86
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.00406c90
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 0x407f40
lea eax, [ebp - 0x4244]
push eax
push edi
mov ecx, ebx
call fcn.004077f0
test byte [ebp - 0x413c], 0x10
je 0x407fd0
lea ecx, [ebp - 0x4240]
push ecx
add ebx, 0x138
push ebx
call fcn.00407e00
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004082f3
mov esp, ebp
pop ebp
ret 0xc
mov edi, dword [ebp - 0x424c]
mov al, byte [edi]
mov esi, edi
mov ecx, edi
test al, al
je 0x408098
cmp al, 0x2f
je 0x407fec
cmp al, 0x5c
jne 0x407fef
lea esi, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x407fe4
cmp esi, edi
je 0x408098
lea edx, [ebp - 0x114]
mov eax, edi
sub edx, edi
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x408010
sub esi, edi
mov byte [ebp + esi - 0x115], cl
mov al, byte [ebp - 0x114]
cmp al, 0x2f
je 0x408040
cmp al, 0x5c
je 0x408040
cmp byte [ebp - 0x113], 0x3a
mov byte [ebp - 0x4245], cl
jne 0x408047
mov byte [ebp - 0x4245], 1
lea edx, [ebp - 0x114]
push 0x418098
push edx
call fcn.00409149
mov esi, eax
lea eax, [ebp - 0x114]
push 0x41809c
push eax
call fcn.00409149
add esp, 0x10
test eax, eax
setne cl
test esi, esi
setne dl
or cl, dl
or cl, byte [ebp - 0x4245]
jne 0x408098
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebx + 0x138]
push ecx
call fcn.00407e00
add esp, 8
mov edx, dword [ebp - 0x413c]
push 0
push edx
push 2
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4080d2
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004082f3
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx]
call fcn.00407410
lea eax, [ebp - 0x4114]
push eax
mov eax, dword [ebx]
mov ecx, 0x4000
mov byte [ebp - 0x4245], 0
call fcn.00407520
add esp, 4
test eax, eax
js 0x408134
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x40813b
push 0
lea ecx, [ebp - 0x424c]
push ecx
push eax
lea edx, [ebp - 0x4114]
push edx
push esi
call edi
test eax, eax
je 0x408134
lea eax, [ebp - 0x4114]
push eax
mov eax, dword [ebx]
mov ecx, 0x4000
call fcn.00407520
add esp, 4
test eax, eax
jns 0x408100
mov byte [ebp - 0x4245], 1
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x40816c
cmp byte [ebp - 0x4245], 0
jne 0x40816c
lea ecx, [ebp - 0x4128]
push ecx
lea edx, [ebp - 0x4138]
push edx
lea eax, [ebp - 0x4130]
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.004076b0
movzx eax, byte [ebp - 0x4245]
mov ecx, dword [ebp - 8]
neg eax
pop edi
sbb eax, eax
pop esi
xor ecx, ebp
and eax, 0x400
pop ebx
call fcn.004082f3
mov esp, ebp
pop ebp
ret 0xc