Function at 0x4df2a4
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4574
call fcn.005374e0
push ebx
mov dword [ebp - 0x4570], ecx
cmp dword [ebp + 0x14], 3
je 0x4df2d4
cmp dword [ebp + 0x14], 2
je 0x4df2d4
cmp dword [ebp + 0x14], 1
je 0x4df2d4
mov eax, 0x10000
jmp 0x4df7ee
cmp dword [ebp + 0x14], 3
jne 0x4df3ff
mov eax, dword [ebp - 0x4570]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
je 0x4df395
mov edx, dword [ebp - 0x4570]
cmp dword [edx + 4], 0xffffffff
je 0x4df30d
mov eax, dword [ebp - 0x4570]
mov ecx, dword [eax]
push ecx
call fcn.004de786
add esp, 4
mov edx, dword [ebp - 0x4570]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 0x4570]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
jl 0x4df334
mov eax, 0x10000
jmp 0x4df7ee
mov eax, dword [ebp - 0x4570]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0x10]
jge 0x4df355
mov eax, dword [ebp - 0x4570]
mov ecx, dword [eax]
push ecx
call fcn.004ddc84
add esp, 4
mov edx, dword [ebp - 0x4570]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp + 8]
jge 0x4df378
mov edx, dword [ebp - 0x4570]
mov eax, dword [edx]
push eax
call fcn.004ddcf2
add esp, 4
jmp 0x4df355
mov ecx, dword [ebp - 0x4570]
mov edx, dword [ecx]
push edx
call fcn.004de192
add esp, 4
mov eax, dword [ebp - 0x4570]
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x4570]
mov edx, dword [ecx]
push edx
call fcn.004de351
add esp, 0xc
mov dword [ebp - 0x4140], eax
cmp dword [ebp - 0x4140], 0
jle 0x4df3c7
mov eax, 0x600
jmp 0x4df7ee
mov eax, dword [ebp - 0x4570]
mov ecx, dword [eax]
push ecx
call fcn.004de786
add esp, 4
mov edx, dword [ebp - 0x4570]
mov dword [edx + 4], 0xffffffff
cmp dword [ebp - 0x4140], 0
jne 0x4df3f5
xor eax, eax
jmp 0x4df7ee
mov eax, 0x5000000
jmp 0x4df7ee
mov eax, dword [ebp - 0x4570]
cmp dword [eax + 4], 0xffffffff
je 0x4df41c
mov ecx, dword [ebp - 0x4570]
mov edx, dword [ecx]
push edx
call fcn.004de786
add esp, 4
mov eax, dword [ebp - 0x4570]
mov dword [eax + 4], 0xffffffff
mov ecx, dword [ebp - 0x4570]
mov edx, dword [ecx]
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 4]
jl 0x4df443
mov eax, 0x10000
jmp 0x4df7ee
mov ecx, dword [ebp - 0x4570]
mov edx, dword [ecx]
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 0x10]
jge 0x4df464
mov ecx, dword [ebp - 0x4570]
mov edx, dword [ecx]
push edx
call fcn.004ddc84
add esp, 4
mov eax, dword [ebp - 0x4570]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x10]
cmp edx, dword [ebp + 8]
jge 0x4df487
mov eax, dword [ebp - 0x4570]
mov ecx, dword [eax]
push ecx
call fcn.004ddcf2
add esp, 4
jmp 0x4df464
lea edx, [ebp - 0x412c]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x4570]
call fcn.004dea2b
mov ecx, dword [ebp - 0x4024]
and ecx, 0x10
test ecx, ecx
je 0x4df4f5
cmp dword [ebp + 0x14], 1
jne 0x4df4b7
xor eax, eax
jmp 0x4df7ee
push 0x103
lea edx, [ebp - 0x4348]
push edx
lea eax, [ebp - 0x412c]
push eax
call fcn.004df7f5
add esp, 0xc
lea ecx, [ebp - 0x4348]
push ecx
mov edx, dword [ebp - 0x4570]
add edx, 0x138
push edx
call fcn.004df192
add esp, 8
xor eax, eax
jmp 0x4df7ee
cmp dword [ebp + 0x14], 1
jne 0x4df509
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4134], eax
jmp 0x4df69c
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x4350], ecx
mov edx, dword [ebp - 0x4350]
mov dword [ebp - 0x434c], edx
mov eax, dword [ebp - 0x434c]
xor ecx, ecx
mov cx, word [eax]
test ecx, ecx
je 0x4df56d
mov edx, dword [ebp - 0x434c]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2f
je 0x4df54d
mov ecx, dword [ebp - 0x434c]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x5c
jne 0x4df55c
mov eax, dword [ebp - 0x434c]
add eax, 2
mov dword [ebp - 0x4350], eax
mov ecx, dword [ebp - 0x434c]
add ecx, 2
mov dword [ebp - 0x434c], ecx
jmp 0x4df51e
mov edx, dword [ebp - 0x4350]
cmp edx, dword [ebp + 0xc]
je 0x4df67a
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x455c]
push ecx
call fcn.005378e2
add esp, 8
mov edx, dword [ebp - 0x4350]
sub edx, dword [ebp + 0xc]
sar edx, 1
mov word [ebp + edx*2 - 0x455e], 0
mov eax, dword [ebp - 0x455c]
and eax, 0xffff
cmp eax, 0x2f
je 0x4df5e2
mov ecx, dword [ebp - 0x455c]
and ecx, 0xffff
cmp ecx, 0x5c
je 0x4df5e2
mov edx, dword [ebp - 0x455a]
and edx, 0xffff
cmp edx, 0x3a
je 0x4df5e2
mov dword [ebp - 0x4574], 0
jmp 0x4df5ec
mov dword [ebp - 0x4574], 1
mov al, byte [ebp - 0x4574]
mov byte [ebp - 0x4354], al
push 0x5bc948
lea ecx, [ebp - 0x455c]
push ecx
call fcn.005387bc
add esp, 8
mov dword [ebp - 0x456c], eax
mov ebx, dword [ebp - 0x4354]
and ebx, 0xff
push 0x5bc940
lea edx, [ebp - 0x455c]
push edx
call fcn.005387bc
add esp, 8
neg eax
sbb eax, eax
neg eax
xor ecx, ecx
cmp dword [ebp - 0x456c], 0
setne cl
or eax, ecx
or ebx, eax
mov byte [ebp - 0x4354], bl
mov edx, dword [ebp - 0x4354]
and edx, 0xff
test edx, edx
jne 0x4df67a
lea eax, [ebp - 0x455c]
push eax
mov ecx, dword [ebp - 0x4570]
add ecx, 0x138
push ecx
call fcn.004df192
add esp, 8
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x4134], eax
cmp dword [ebp - 0x4134], 0xffffffff
jne 0x4df6af
mov eax, 0x200
jmp 0x4df7ee
mov eax, dword [ebp - 0x4570]
mov ecx, dword [eax]
push ecx
call fcn.004de192
add esp, 4
mov byte [ebp - 0x4138], 0
push 0x4000
lea edx, [ebp - 0x4000]
push edx
mov eax, dword [ebp - 0x4570]
mov ecx, dword [eax]
push ecx
call fcn.004de351
add esp, 0xc
mov dword [ebp - 0x4560], eax
cmp dword [ebp - 0x4560], 0
jge 0x4df6fc
mov byte [ebp - 0x4138], 1
jmp 0x4df745
cmp dword [ebp - 0x4560], 0
jne 0x4df707
jmp 0x4df745
push 0
lea edx, [ebp - 0x4564]
push edx
mov eax, dword [ebp - 0x4560]
push eax
lea ecx, [ebp - 0x4000]
push ecx
mov edx, dword [ebp - 0x4134]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x4568], eax
cmp dword [ebp - 0x4568], 0
jne 0x4df743
mov byte [ebp - 0x4138], 1
jmp 0x4df745
jmp 0x4df6c7
mov byte [ebp - 0x413c], 0
mov eax, dword [ebp - 0x4134]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0x4130], eax
cmp dword [ebp - 0x4130], 1
jne 0x4df77f
mov ecx, dword [ebp - 0x4138]
and ecx, 0xff
test ecx, ecx
jne 0x4df77f
mov byte [ebp - 0x413c], 1
mov edx, dword [ebp - 0x413c]
and edx, 0xff
test edx, edx
je 0x4df7b1
lea eax, [ebp - 0x4010]
push eax
lea ecx, [ebp - 0x4020]
push ecx
lea edx, [ebp - 0x4018]
push edx
mov eax, dword [ebp - 0x4134]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x4df7c4
mov ecx, dword [ebp - 0x4134]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x4570]
mov eax, dword [edx]
push eax
call fcn.004de786
add esp, 4
mov ecx, dword [ebp - 0x4138]
and ecx, 0xff
test ecx, ecx
je 0x4df7ec
mov eax, 0x400
jmp 0x4df7ee
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10