Function at 0x4084d7
Capabilities:
Write file on windows

Disassembly:
push 0x65c
mov eax, 0x4506e5
call fcn.00421b9a
mov edi, ecx
cmp dword [ebp + 0x14], 3
mov esi, dword [ebp + 0xc]
je 0x408823
cmp dword [ebp + 0x14], 2
je 0x40850b
cmp dword [ebp + 0x14], 1
je 0x40850b
mov eax, 0x10000
jmp 0x4088c4
cmp dword [edi + 4], 0xffffffff
je 0x408519
push dword [edi]
call fcn.0040b0af
pop ecx
mov eax, dword [edi]
or dword [edi + 4], 0xffffffff
mov ebx, dword [ebp + 8]
cmp ebx, dword [eax + 4]
jge 0x408501
cmp ebx, dword [eax + 0x10]
jge 0x40853c
push eax
call fcn.0040b119
jmp 0x40853b
push dword [edi]
call fcn.0040b158
pop ecx
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jl 0x408534
lea eax, [ebp - 0x654]
mov ecx, edi
push eax
push ebx
call fcn.00407c3d
mov eax, dword [ebp - 0x448]
shr eax, 4
and al, 1
je 0x40859b
cmp dword [ebp + 0x14], 1
je 0x4088a5
movzx eax, word [esi]
cmp eax, 0x2f
je 0x40858c
cmp eax, 0x5c
je 0x40858c
test ax, ax
je 0x408582
cmp word [esi + 2], 0x3a
je 0x40858c
push esi
lea eax, [edi + 0x244]
push eax
jmp 0x40858f
push esi
push 0
call fcn.00407a7a
pop ecx
pop ecx
jmp 0x4088a5
xor eax, eax
xor ebx, ebx
cmp dword [ebp + 0x14], 1
mov word [ebp - 0x420], ax
je 0x40873e
movzx eax, word [esi]
mov ecx, esi
push 0x5c
mov dword [ebp - 0x424], esi
mov dword [ebp - 0x65c], 0x2f
pop edx
jmp 0x4085ea
cmp ax, word [ebp - 0x65c]
je 0x4085d8
cmp ax, dx
jne 0x4085e4
lea edx, [ecx + 2]
push 0x5c
mov dword [ebp - 0x424], edx
pop edx
add ecx, 2
movzx eax, word [ecx]
test ax, ax
jne 0x4085ca
mov eax, 0x104
push eax
push esi
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.004225f4
mov eax, dword [ebp - 0x424]
add esp, 0x10
cmp eax, esi
jne 0x40861b
xor eax, eax
mov word [ebp - 0x218], ax
jmp 0x40865b
sub eax, esi
and eax, 0xfffffffe
cmp eax, 0x208
jae 0x40881e
xor ecx, ecx
mov word [ebp + eax - 0x218], cx
mov ax, word [ebp - 0x218]
push 0x2f
pop ecx
cmp ax, cx
je 0x4086c0
push 0x5c
pop ecx
cmp ax, cx
je 0x4086c0
test ax, ax
je 0x40865b
cmp word [ebp - 0x216], 0x3a
je 0x4086c0
lea eax, [ebp - 0x668]
push str.bDVrPGA8
push eax
call fcn.00407959
pop ecx
pop ecx
mov edx, dword [ebp - 0x424]
lea ecx, [ebp - 0x218]
push edx
push ecx
lea esi, [edi + 0x244]
mov dword [ebp - 4], 1
push esi
push ebx
mov ecx, eax
call fcn.00404f20
push eax
lea eax, [ebp - 0x420]
push 0x104
push eax
call fcn.0040bdc0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x668]
add esp, 0x18
call fcn.00404a45
lea eax, [ebp - 0x218]
push eax
push esi
jmp 0x408718
lea eax, [ebp - 0x668]
push str.bDVrPA
push eax
call fcn.00407959
pop ecx
pop ecx
mov edx, dword [ebp - 0x424]
lea ecx, [ebp - 0x218]
push edx
push ecx
push ebx
mov ecx, eax
mov dword [ebp - 4], ebx
call fcn.00404f20
push eax
lea eax, [ebp - 0x420]
push 0x104
push eax
call fcn.0040bdc0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x668]
add esp, 0x14
call fcn.00404a45
lea eax, [ebp - 0x218]
push eax
push ebx
call fcn.00407a7a
pop ecx
pop ecx
push ebx
push dword [ebp - 0x448]
lea eax, [ebp - 0x420]
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40874d
mov eax, 0x200
jmp 0x4088c4
push dword [edi + 0x23c]
push dword [edi]
call fcn.0040b1b7
pop ecx
pop ecx
cmp dword [edi + 0x240], ebx
jne 0x408775
push 0x4000
call fcn.0041d90c
pop ecx
mov dword [edi + 0x240], eax
lea eax, [ebp - 0x655]
push eax
push 0x4000
push dword [edi + 0x240]
push dword [edi]
call fcn.0040b4aa
add esp, 0x10
mov dword [ebp - 0x65c], eax
cmp eax, 0xffffff96
je 0x4087dd
test eax, eax
js 0x4087cf
jle 0x4087c2
push ebx
lea ecx, [ebp - 0x424]
push ecx
push eax
push dword [edi + 0x240]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4087d6
mov eax, dword [ebp - 0x65c]
cmp byte [ebp - 0x655], 0
jne 0x4087e2
test eax, eax
jne 0x408775
mov ebx, 0x5000000
jmp 0x4087e2
mov ebx, 0x400
jmp 0x4087e2
mov ebx, 0x1000
push dword [edi]
call fcn.0040b0af
pop ecx
test ebx, ebx
jne 0x40880a
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x444]
push eax
lea eax, [ebp - 0x43c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x408817
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x4088c4
call fcn.0041ebd7
mov ebx, dword [ebp + 8]
cmp ebx, dword [edi + 4]
je 0x408875
cmp dword [edi + 4], 0xffffffff
je 0x408839
push dword [edi]
call fcn.0040b0af
pop ecx
mov eax, dword [edi]
or dword [edi + 4], 0xffffffff
cmp ebx, dword [eax + 4]
jge 0x408501
cmp ebx, dword [eax + 0x10]
jge 0x40885d
push eax
call fcn.0040b119
jmp 0x40885c
push dword [edi]
call fcn.0040b158
pop ecx
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jl 0x408855
push dword [edi + 0x23c]
push eax
call fcn.0040b1b7
pop ecx
pop ecx
mov dword [edi + 4], ebx
lea eax, [ebp - 0x655]
push eax
push dword [ebp + 0x10]
push esi
push dword [edi]
call fcn.0040b4aa
mov esi, eax
add esp, 0x10
test esi, esi
jg 0x40889c
push dword [edi]
call fcn.0040b0af
or dword [edi + 4], 0xffffffff
pop ecx
cmp byte [ebp - 0x655], 0
je 0x4088a9
xor eax, eax
jmp 0x4088c4
test esi, esi
jle 0x4088b4
mov eax, 0x600
jmp 0x4088c4
cmp esi, 0xffffff96
mov eax, 0x5000000
mov ecx, 0x1000
cmove eax, ecx
call fcn.00421b49
ret 0x10