Function at 0x4158c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x423c
call fcn.00569a40
mov eax, dword [0x5f9e74]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push edi
mov edi, ecx
mov dword [ebp - 0x423c], eax
cmp dword [edi + 4], 0xffffffff
je 0x4158f1
mov ecx, dword [edi]
call fcn.00415100
mov ecx, dword [edi]
mov ebx, dword [ebp + 8]
mov dword [edi + 4], 0xffffffff
cmp ebx, dword [ecx + 4]
jl 0x415919
pop edi
mov eax, 0x10000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00568e6a
mov esp, ebp
pop ebp
ret 0x10
cmp ebx, dword [ecx + 0x10]
jge 0x415923
call fcn.00414b80
mov eax, dword [edi]
push esi
cmp dword [eax + 0x10], ebx
jge 0x415980
nop dword [eax + eax]
mov esi, dword [edi]
test esi, esi
je 0x415979
cmp dword [esi + 0x18], 0
je 0x415979
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x415979
mov ecx, dword [esi + 0x50]
sub esp, 0x10
mov eax, dword [esi + 0x48]
add ecx, dword [esi + 0x4c]
add eax, 0x2e
add eax, ecx
mov dword [esi + 0x10], edx
add dword [esi + 0x14], eax
lea edx, [esi + 0x28]
push 0
lea eax, [esi + 0x78]
mov ecx, esi
push 0
push eax
call fcn.004146a0
add esp, 0x1c
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jl 0x415930
lea eax, [ebp - 0x4234]
mov ecx, edi
push eax
push ebx
call fcn.00415180
test byte [ebp - 0x412c], 0x10
je 0x4159be
lea ecx, [edi + 0x138]
lea edx, [ebp - 0x4230]
call fcn.004157e0
pop esi
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00568e6a
mov esp, ebp
pop ebp
ret 0x10
mov ebx, dword [ebp - 0x423c]
mov edx, ebx
mov ecx, ebx
mov al, byte [ebx]
test al, al
je 0x415a8b
cmp al, 0x2f
je 0x4159da
cmp al, 0x5c
jne 0x4159dd
lea edx, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x4159d2
cmp edx, ebx
je 0x415a8b
lea esi, [ebp - 0x108]
mov ecx, ebx
sub esi, ebx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x4159f7
sub edx, ebx
dec edx
cmp edx, 0x104
jae 0x415b78
mov byte [ebp + edx - 0x108], al
mov al, byte [ebp - 0x108]
cmp al, 0x2f
je 0x415a38
cmp al, 0x5c
je 0x415a38
cmp byte [ebp - 0x107], 0x3a
mov byte [ebp - 0x4235], 0
jne 0x415a3f
mov byte [ebp - 0x4235], 1
lea eax, [ebp - 0x108]
push 0x5d6914
push eax
call fcn.0057d8c2
mov esi, eax
lea eax, [ebp - 0x108]
push 0x5d6918
push eax
call fcn.0057d8c2
add esp, 0x10
test eax, eax
setne cl
test esi, esi
setne al
or cl, al
or cl, byte [ebp - 0x4235]
jne 0x415a8b
lea ecx, [edi + 0x138]
lea edx, [ebp - 0x108]
call fcn.004157e0
push 0
push dword [ebp - 0x412c]
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x415ac4
pop esi
pop edi
mov eax, 0x200
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00568e6a
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [edi]
call fcn.00414e50
mov ecx, dword [edi]
lea edx, [ebp - 0x4108]
push 0x4000
xor bl, bl
call fcn.00414f70
add esp, 4
test eax, eax
js 0x415b1d
je 0x415b1f
push 0
lea ecx, [ebp - 0x423c]
push ecx
push eax
lea eax, [ebp - 0x4108]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x415b1d
mov ecx, dword [edi]
lea edx, [ebp - 0x4108]
push 0x4000
call fcn.00414f70
add esp, 4
test eax, eax
jns 0x415ae6
mov bl, 1
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x415b4b
test bl, bl
jne 0x415b4b
lea eax, [ebp - 0x4118]
push eax
lea eax, [ebp - 0x4128]
push eax
lea eax, [ebp - 0x4120]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi]
call fcn.00415100
xor eax, eax
mov ecx, 0x400
test bl, bl
pop esi
cmovne eax, ecx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.00568e6a
mov esp, ebp
pop ebp
ret 0x10
call fcn.0056948c
int3