Function at 0x402e20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xca0
mov eax, dword [0x4c32cc]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
xor esi, esi
push edi
mov dword [ebp - 0xc7c], esi
mov dword [ebp - 0xc70], 0x41800
cmp dword [0x4cd38c], esi
je 0x402e55
call fcn.0048fcc0
lea ecx, [ebp - 0x114]
mov dword [0x4cd38c], esi
mov dword [0x4d1bc0], 2
call fcn.00403450
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebp + eax - 0x115], 0x5c
lea eax, [ebp + eax - 0x115]
jne 0x402e91
mov byte [eax], 0
call fcn.00404b90
cmp eax, 2
jle 0x402f17
mov edx, 0x104
lea eax, [ebp - 0x114]
cmp byte [eax], 0
je 0x402ece
inc eax
dec edx
jne 0x402ea6
lea ebx, [edx + 3]
lea ecx, [ebp - 0x114]
call fcn.00404c30
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004a01d6
mov esp, ebp
pop ebp
ret
cmp edx, esi
je 0x402ef6
mov ecx, 0x104
sub ecx, edx
mov eax, 0x104
sub eax, ecx
push str.cookies.sqlite
lea ecx, [ebp + ecx - 0x114]
mov edx, 0x7fffffff
call fcn.00401000
mov ebx, 3
lea ecx, [ebp - 0x114]
call fcn.00404c30
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004a01d6
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x114]
push ecx
mov edx, 0x7ffffffe
mov eax, 0x104
lea ecx, [ebp - 0x21c]
call fcn.00401000
mov edx, 0x104
lea eax, [ebp - 0x114]
mov edi, edi
cmp byte [eax], 0
je 0x402f4b
inc eax
dec edx
jne 0x402f40
jmp 0x402f73
cmp edx, esi
je 0x402f73
mov ecx, 0x104
sub ecx, edx
mov eax, 0x104
sub eax, ecx
push str.cookies.txt
lea ecx, [ebp + ecx - 0x114]
mov edx, 0x7fffffff
call fcn.00401000
mov edx, 0x104
lea eax, [ebp - 0x21c]
mov edi, edi
cmp byte [eax], 0
je 0x402f8b
inc eax
dec edx
jne 0x402f80
jmp 0x402fb3
cmp edx, esi
je 0x402fb3
mov ecx, 0x104
sub ecx, edx
mov eax, 0x104
sub eax, ecx
push str.cookiesnew.txt
lea ecx, [ebp + ecx - 0x21c]
mov edx, 0x7fffffff
call fcn.00401000
mov edi, dword [sym.imp.KERNEL32.dll_OpenFile]
mov dword [ebp - 0xc84], esi
cmp dword [ebp + 8], esi
jle 0x402fe4
push 0x1041
lea edx, [ebp - 0x63c]
push edx
lea eax, [ebp - 0x21c]
push eax
call edi
mov dword [ebp - 0xc84], eax
cmp eax, 0xffffffff
je 0x40305e
push 0x40
lea ecx, [ebp - 0x5b4]
push ecx
lea edx, [ebp - 0x114]
push edx
call edi
mov edi, eax
cmp edi, 0xffffffff
je 0x40305e
mov eax, dword [ebp - 0xc70]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
add eax, 0x20
push eax
push 0x40
call ebx
mov dword [ebp - 0xc90], eax
cmp eax, esi
je 0x403057
mov esi, dword [sym.imp.KERNEL32.dll_GlobalLock]
push eax
call esi
mov ecx, dword [ebp - 0xc70]
push ecx
push eax
push edi
mov dword [ebp - 0xc88], eax
call dword [sym.imp.KERNEL32.dll__lread]
mov dword [ebp - 0xc80], eax
test eax, eax
jne 0x403071
mov esi, dword [ebp - 0xc90]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push edi
call dword [sym.imp.KERNEL32.dll__lclose]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004a01d6
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll__lclose]
mov edx, dword [ebp - 0xc80]
mov eax, dword [ebp - 0xc88]
push 0x630
lea ecx, [ebp - 0xc6c]
push 0
push ecx
mov byte [edx + eax], 0
call fcn.004a3190
mov edx, dword [ebp - 0xc70]
add esp, 0xc
add edx, 0x20
push edx
push 0x40
call ebx
mov edi, eax
mov eax, dword [ebp - 0xc70]
add eax, 0x20
push eax
push 0x40
mov dword [ebp - 0xc98], edi
call ebx
mov ebx, eax
xor eax, eax
push edi
mov dword [ebp - 0xc9c], ebx
mov dword [ebp - 0xc8c], eax
mov dword [ebp - 0xc74], eax
call esi
push ebx
mov dword [ebp - 0xc78], eax
call esi
mov esi, eax
mov eax, dword [ebp - 0xc80]
xor ecx, ecx
xor edi, edi
xor ebx, ebx
mov dword [ebp - 0xc94], edi
cmp eax, ecx
jle 0x4033a4
jmp 0x403104
xor ecx, ecx
cmp ebx, eax
jge 0x403395
mov edx, dword [ebp - 0xc88]
mov al, byte [edi + edx]
cmp al, 0xa
jne 0x40324a
mov eax, dword [ebp - 0xc74]
mov edx, dword [ebp - 0xc78]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
xor ebx, ebx
push esi
mov dword [ebp - 0xc8c], ecx
mov byte [edx + eax], bl
mov dword [ebp - 0xc74], ecx
call edi
cmp eax, 0x200
jge 0x403160
push esi
mov edx, 0x7ffffffe
mov eax, 0x200
lea ecx, [ebp - 0x840]
call fcn.00401000
lea eax, [ebp - 0x940]
push eax
lea ecx, [ebp - 0xc6c]
push ecx
push str._s____s
lea edx, [ebp - 0x31c]
push 0x100
push edx
call fcn.00402830
add esp, 0x14
cmp dword [ebp + 8], ebx
jle 0x4031ee
mov edi, dword [ebp - 0xc78]
call fcn.0048dd00
test eax, eax
jne 0x40336a
push 0x200
lea eax, [ebp - 0x31c]
push eax
push str.SoftwareBillP_StudiosWinPatrolNuts
lea ecx, [ebp - 0x51c]
mov edx, 0x80000001
call fcn.0048e050
add esp, 0xc
test eax, eax
jne 0x40336a
push eax
lea ecx, [ebp - 0xc70]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [ebp - 0xc84]
push eax
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x40336a
lea eax, [ebp - 0xc6c]
push eax
call edi
test eax, eax
jle 0x40322f
mov ecx, dword [ebp - 0x964]
push ecx
push 0x1f8
lea edx, [ebp - 0x960]
push edx
lea eax, [ebp - 0x840]
push eax
lea edx, [ebp - 0xa68]
lea ecx, [ebp - 0x31c]
call fcn.0048f730
add esp, 0x10
inc dword [ebp - 0xc7c]
push 0x630
lea ecx, [ebp - 0xc6c]
push 0
push ecx
call fcn.004a3190
add esp, 0xc
jmp 0x40336a
cmp al, 9
jne 0x403366
mov eax, dword [ebp - 0xc8c]
inc eax
mov dword [ebp - 0xc8c], eax
dec eax
mov byte [ebx + esi], 0
cmp eax, 6
ja case.default.0x40326d
jmp dword [eax*4 + 0x403428]
mov al, byte [esi]
cmp al, 0x23
je case.default.0x40326d
cmp al, 0x2e
lea ecx, [ebp - 0xc6c]
mov eax, 0x200
jne 0x403357
lea edx, [esi + 1]
push edx
mov edx, 0x7ffffffe
call fcn.00401000
xor ebx, ebx
jmp 0x40336a
mov edx, str.TRUE
mov ecx, esi
call fcn.0047dee0
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0xa6c], eax
xor ebx, ebx
jmp 0x40336a
mov eax, 0x104
lea ecx, [ebp - 0xa68]
push esi
mov edx, 0x7ffffffe
call fcn.00401000
xor ebx, ebx
jmp 0x40336a
mov edx, str.TRUE
mov ecx, esi
call fcn.0047dee0
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0x964], eax
xor ebx, ebx
jmp 0x40336a
push esi
call fcn.004a02e3
add esp, 4
lea ecx, [ebp - 0x52c]
cdq
push ecx
push edx
push eax
call fcn.00480700
lea edx, [ebp - 0x960]
add esp, 0xc
push edx
lea ecx, [ebp - 0x52c]
call fcn.004807a0
add esp, 4
xor ebx, ebx
jmp 0x40336a
mov eax, 0x100
lea ecx, [ebp - 0x940]
push esi
mov edx, 0x7ffffffe
call fcn.00401000
xor ebx, ebx
jmp 0x40336a
mov eax, 0x200
lea ecx, [ebp - 0x840]
push esi
mov edx, 0x7ffffffe
call fcn.00401000
xor ebx, ebx
jmp 0x40336a
mov byte [ebx + esi], al
inc ebx
mov eax, dword [ebp - 0xc88]
mov edi, dword [ebp - 0xc94]
mov cl, byte [edi + eax]
mov eax, dword [ebp - 0xc74]
mov edx, dword [ebp - 0xc78]
mov byte [edx + eax], cl
inc eax
mov dword [ebp - 0xc74], eax
mov eax, dword [ebp - 0xc80]
inc edi
mov dword [ebp - 0xc94], edi
cmp edi, eax
jl 0x403102
mov edi, dword [ebp - 0xc90]
mov byte [ebx + esi], 0
mov esi, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
dec ebx
push edi
mov dword [ebp - 0xc70], ebx
call esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
call edi
mov ebx, dword [ebp - 0xc9c]
push ebx
call esi
push ebx
call edi
mov ebx, dword [ebp - 0xc98]
push ebx
call esi
push ebx
call edi
mov eax, dword [ebp - 0xc84]
test eax, eax
je 0x40340c
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
push str.UpdateCookieFile
push str.SoftwareBillP_StudiosWinPatrolOptions
mov ecx, 0x4b1c74
mov edx, 0x80000001
call fcn.0048e390
add esp, 8
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xc7c]
pop edi
pop esi
xor ecx, ebp
mov dword [0x4cd38c], eax
pop ebx
call fcn.004a01d6
mov esp, ebp
pop ebp
ret