Function at 0x422096
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1464
call fcn.00452790
push ebx
push esi
xor eax, eax
push edi
mov edi, dword [ebp + 8]
mov ebx, dword [edi + 8]
lea esi, [esp + 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
call fcn.00427406
and dword [esp + 0x20], 0
and dword [esp + 0x24], 0
push 2
pop eax
cmp ebx, eax
mov dword [esp + 0x28], 0x47d9a8
mov dword [esp + 0x2c], edi
jbe 0x4220fc
mov ecx, edi
call fcn.0040545c
call fcn.0040f3c3
cmp eax, 1
jne 0x4220fc
mov dword [esp + 0xc], SysReAllocString
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x45c]
push eax
lea eax, [esp + 0x868]
push eax
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x58]
push eax
push ecx
xor eax, eax
mov ecx, edi
call fcn.0040545c
mov esi, eax
call fcn.0040f2f1
pop ecx
push eax
lea edi, [esp + 0x1080]
call fcn.00422889
test al, al
jne 0x42214d
mov dword [0x47d9b0], 2
jmp 0x42249a
mov edi, dword [esp + 0x48]
push 3
pop esi
cmp edi, esi
je 0x422168
cmp edi, 1
je 0x422168
mov dword [0x47d9b0], esi
jmp 0x42249a
push edi
mov ebx, 0x47d9b8
mov eax, 0x47d790
call fcn.00422983
test al, al
jne 0x422196
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [0x47d9b4], eax
mov dword [0x47d9b0], 4
jmp 0x42249a
cmp edi, esi
je 0x422334
cmp edi, 1
jne 0x4221b0
cmp dword [0x47d980], 2
je 0x422334
xor ebx, ebx
lea esi, [esp + 0x30]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x44], ebx
call fcn.0042742d
test al, al
mov eax, dword [esp + 0x38]
jne 0x4221d8
mov eax, 0x42769b
push ebx
push ebx
push edi
lea ecx, [esp + 0x5c]
push ecx
lea ecx, [esp + 0x468]
push ecx
push dword [esp + 0x60]
lea ecx, [esp + 0x878]
push ecx
push dword [0x47d9b8]
call eax
cmp eax, ebx
mov dword [esp + 0x20], eax
jne 0x42223d
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [0x47d9b4], eax
mov dword [0x47d9b0], 7
cmp dword [esp + 0x30], ebx
je 0x42222b
push dword [esp + 0x30]
call esi
lea eax, [esp + 0x20]
call fcn.004217cb
cmp dword [esp + 0x10], ebx
jmp 0x4223b7
cmp byte [0x47d92d], bl
je 0x42224c
or dword [esp + 0xc], 2
jmp 0x422251
or dword [esp + 0xc], 1
push ebx
push dword [esp + 0x10]
lea ecx, [esp + 0x1070]
push SysReAllocString
push ecx
push eax
lea esi, [esp + 0x50]
call fcn.0042745c
call eax
cmp eax, ebx
mov dword [esp + 0x24], eax
jne 0x4222a3
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp dword [esp + 0x3c], ebx
mov esi, dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [0x47d9b4], eax
mov dword [0x47d9b0], 8
je 0x42221f
push dword [esp + 0x3c]
call esi
jmp 0x42221f
push 0x469e10
xor eax, eax
push ecx
mov ecx, dword [ebp + 8]
inc eax
call fcn.0040545c
mov esi, eax
call fcn.0040f2f1
pop ecx
push eax
call fcn.00450849
mov ebx, eax
xor edi, edi
cmp ebx, edi
pop ecx
pop ecx
jne 0x422311
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp dword [esp + 0x3c], edi
mov esi, dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [0x47d9b4], eax
mov dword [0x47d9b0], 9
je 0x4222f3
push dword [esp + 0x3c]
call esi
cmp dword [esp + 0x30], edi
je 0x4222ff
push dword [esp + 0x30]
call esi
lea eax, [esp + 0x20]
call fcn.004217cb
cmp dword [esp + 0x10], edi
jmp 0x4223b7
cmp dword [esp + 0x3c], edi
je 0x422321
push dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
cmp dword [esp + 0x30], edi
je 0x42240c
push dword [esp + 0x30]
jmp 0x422406
push str.Wininet.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov edi, eax
xor esi, esi
cmp edi, esi
je 0x422359
push str.InternetOpenUrlA
push edi
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
cmp eax, esi
mov ebx, eax
jne 0x42235e
mov ebx, 0x4276a0
mov ecx, dword [ebp + 8]
push esi
push dword [esp + 0x10]
xor eax, eax
push esi
push esi
call fcn.0040545c
mov esi, eax
call fcn.0040f2f1
push eax
push dword [0x47d9b8]
call ebx
test eax, eax
mov dword [esp + 0x24], eax
jne 0x4223c8
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [0x47d9b0], 5
test edi, edi
mov esi, dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov dword [0x47d9b4], eax
je 0x4223a9
push edi
call esi
lea eax, [esp + 0x20]
call fcn.004217cb
cmp dword [esp + 0x10], 0
je 0x4224b4
push dword [esp + 0x10]
call esi
jmp 0x4224b4
push 0x469e10
xor eax, eax
push ecx
mov ecx, dword [ebp + 8]
inc eax
call fcn.0040545c
mov esi, eax
call fcn.0040f2f1
pop ecx
push eax
call fcn.00450849
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
jne 0x422401
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [0x47d9b0], 6
jmp 0x422397
test edi, edi
je 0x42240c
push edi
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
xor edi, edi
inc edi
mov dword [esp + 0x1c], edi
cmp dword [esp + 0x20], 0
jne 0x42242a
push dword [esp + 0x24]
call fcn.004224bd
cmp eax, 0xc8
jne 0x422489
lea esi, [esp + 0x10]
call fcn.00427406
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x422440
mov eax, 0x4093b0
lea ecx, [esp + 0x1c]
push ecx
push 0x400
lea ecx, [esp + 0xc70]
push ecx
push dword [esp + 0x30]
call eax
test eax, eax
je 0x422489
cmp dword [esp + 0x1c], 0
je 0x422493
push ebx
push edi
push dword [esp + 0x24]
lea eax, [esp + 0xc74]
push eax
call fcn.00450b32
mov eax, dword [esp + 0x2c]
add dword [0x47d9ac], eax
add esp, 0x10
test eax, eax
jne 0x422413
jmp 0x422493
mov dword [0x47d9b0], 0xa
push ebx
call fcn.00450c26
pop ecx
lea eax, [esp + 0x20]
call fcn.004217cb
cmp dword [esp + 0x10], 0
je 0x4224b4
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4