Function at 0x402038
Capabilities:
Create http request
Delete file
Get file size
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
push edi
push str._ev1
lea esi, [ebp - 0x20]
mov ebx, eax
call fcn.00401d1b
mov eax, esi
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.004036e3
push dword [eax]
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 1
push 0
call edi
mov dword [ebx + 0x5c], eax
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.0040175b
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
call fcn.0040175b
push str._ev2
lea esi, [ebp - 0x20]
call fcn.00401d1b
mov eax, esi
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.004036e3
push dword [eax]
push 0
push 1
push 0
call edi
mov dword [ebx + 0x60], eax
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.0040175b
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
call fcn.0040175b
mov eax, dword [ebx + 0x5c]
mov edi, dword [ebx + 0x60]
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x30], eax
lea eax, [ebx + 0x24]
push ecx
push eax
mov dword [ebp - 0x38], edi
call fcn.0040367f
mov esi, eax
test esi, esi
je 0x402110
mov ebx, dword [ebx + 0x14]
test ebx, ebx
je 0x4020f1
mov eax, dword [ebx]
push esi
push 0
mov ecx, ebx
call dword [eax + 0x1c]
test edi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4020fe
push edi
call ebx
cmp dword [ebp - 0x30], 0
je 0x402109
push dword [ebp - 0x30]
call ebx
mov eax, esi
jmp 0x40294c
lea edi, [ebp - 0x20]
lea eax, [ebp - 0x18]
mov ecx, ebx
call fcn.0040365b
push 0x10000000
push 0
push dword [ebp - 0x20]
push dword [ebp - 0x18]
push str.AdvancedInstaller
call dword [sym.imp.WININET.dll_InternetOpenA]
mov esi, dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push 0x401f27
push eax
mov dword [ebp - 0x40], eax
call esi
lea ecx, [ebx + 0x1c]
push ecx
lea ecx, [ebx + 0x24]
push ecx
lea ecx, [ebp - 0x14]
lea eax, [ebx + 0x20]
push ecx
call fcn.004010a4
mov eax, dword [ebp - 0x14]
add esp, 0xc
cmp dword [eax - 0xc], 0
jne 0x4021bc
mov ecx, dword [ebx + 0x14]
xor edi, edi
cmp ecx, edi
mov eax, 0xe0000005
mov dword [ebx + 0x10], eax
je 0x40217e
mov edx, dword [ecx]
push eax
push edi
call dword [edx + 0x1c]
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebx + 0x10]
add eax, 0xfffffff0
call fcn.0040175b
push edi
push dword [ebp - 0x40]
call esi
push dword [ebp - 0x40]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x38], edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4021ab
push dword [ebp - 0x38]
call esi
cmp dword [ebp - 0x30], edi
je 0x4021b5
push dword [ebp - 0x30]
call esi
mov eax, ebx
jmp 0x40294c
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 8], eax
call fcn.00401773
add eax, 0x10
mov edi, str..part
mov ecx, edi
mov dword [ebp - 4], eax
call fcn.00401d64
push eax
push edi
lea eax, [ebp - 4]
push eax
call fcn.00401cb8
mov cl, 1
mov eax, ebx
call fcn.0040344f
and dword [ebp - 0x10], 0
cmp byte [ebx + 0x40], 0
je 0x402205
lea eax, [ebp - 4]
call fcn.00404bc8
mov dword [ebp - 0x10], eax
mov edi, dword [ebp - 0x40]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebx + 0x70]
push edi
mov ecx, ebx
call fcn.00402951
mov dword [ebp - 0xc], eax
mov eax, ebx
call fcn.00403483
test al, al
je 0x40226c
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.0040175b
mov eax, dword [ebp - 8]
call fcn.0040175b
xor ebx, ebx
push ebx
push edi
call esi
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x38], ebx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x402259
push dword [ebp - 0x38]
call esi
cmp dword [ebp - 0x30], ebx
je 0x40248a
push dword [ebp - 0x30]
call esi
jmp 0x40248a
cmp dword [ebp - 0xc], 0
je 0x4022d1
cmp dword [ebp - 0xc], 0xe0000013
je 0x40228e
mov ebx, dword [ebx + 0x14]
test ebx, ebx
je 0x40228e
push dword [ebp - 0xc]
mov eax, dword [ebx]
push 0
mov ecx, ebx
call dword [eax + 0x1c]
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.0040175b
mov eax, dword [ebp - 8]
call fcn.0040175b
xor ebx, ebx
push ebx
push edi
call esi
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x38], ebx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4022be
push dword [ebp - 0x38]
call esi
cmp dword [ebp - 0x30], ebx
je 0x4026ac
push dword [ebp - 0x30]
call esi
jmp 0x4026ac
mov eax, dword [ebx + 8]
push dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x48], eax
mov eax, dword [ebx]
mov dword [ebp - 0x50], eax
push esi
mov eax, ebx
mov dword [ebp - 0x4c], ebx
call fcn.0040342d
mov eax, ebx
call fcn.00403483
test al, al
jne 0x40230a
xor edi, edi
cmp esi, edi
jbe 0x40236c
cmp esi, dword [ebp - 0x10]
jne 0x40236c
mov eax, ebx
call fcn.00403472
mov esi, ebx
lea edi, [ebp - 0x50]
call fcn.0040336d
cmp dword [ebp - 0x48], 0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x402325
push dword [ebp - 0x48]
call esi
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.0040175b
mov eax, dword [ebp - 8]
call fcn.0040175b
xor edi, edi
push edi
push dword [ebp - 0x40]
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push dword [ebp - 0x40]
call esi
cmp dword [ebp - 0x38], edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x402359
push dword [ebp - 0x38]
call esi
cmp dword [ebp - 0x30], edi
je 0x40294a
push dword [ebp - 0x30]
call esi
jmp 0x40294a
push edi
lea eax, [ebp - 4]
push edi
push eax
call fcn.0040cee1
add esp, 0xc
cmp eax, edi
mov dword [ebp - 0xc], eax
je 0x4023e6
mov ecx, dword [ebx + 0x14]
cmp ecx, edi
je 0x40238f
mov edx, dword [ecx]
push eax
push edi
call dword [edx + 0x1c]
lea edi, [ebp - 0x50]
mov esi, ebx
call fcn.0040336d
cmp dword [ebp - 0x48], 0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x4023aa
push dword [ebp - 0x48]
call esi
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.0040175b
mov eax, dword [ebp - 8]
call fcn.0040175b
xor edi, edi
push edi
push dword [ebp - 0x40]
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push dword [ebp - 0x40]
call esi
cmp dword [ebp - 0x38], edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4023de
push dword [ebp - 0x38]
call esi
cmp dword [ebp - 0x30], edi
jmp 0x4022c1
xor eax, eax
xor edi, edi
cmp eax, dword [ebp - 0x10]
push edi
sbb eax, eax
neg eax
push 0x80
inc eax
inc eax
push eax
push edi
push edi
push 0xc0000000
lea esi, [ebp - 4]
call fcn.00403840
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x58], eax
jne 0x402516
mov eax, ebx
call fcn.00403483
test al, al
je 0x402494
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [ebp - 0x50]
mov esi, ebx
call fcn.0040336d
cmp dword [ebp - 0x48], 0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x40244a
push dword [ebp - 0x48]
call esi
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.0040175b
mov eax, dword [ebp - 8]
call fcn.0040175b
xor edi, edi
push edi
push dword [ebp - 0x40]
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push dword [ebp - 0x40]
call esi
cmp dword [ebp - 0x38], edi
je 0x40247c
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x30], edi
je 0x40248a
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe0000008
jmp 0x40294c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebx + 0x14]
cmp ecx, edi
mov dword [ebp - 0x20], eax
je 0x4024ab
mov edx, dword [ecx]
push eax
push edi
call dword [edx + 0x1c]
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [ebp - 0x50]
mov esi, ebx
call fcn.0040336d
cmp dword [ebp - 0x48], 0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x4024ce
push dword [ebp - 0x48]
call esi
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.0040175b
mov eax, dword [ebp - 8]
call fcn.0040175b
xor edi, edi
push edi
push dword [ebp - 0x40]
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push dword [ebp - 0x40]
call esi
cmp dword [ebp - 0x38], edi
je 0x402500
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x30], edi
je 0x40250e
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
jmp 0x40294c
cmp dword [ebp - 0x10], edi
jbe 0x402535
mov esi, dword [ebp - 0x58]
push 2
push edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x10]
mov eax, ebx
call fcn.0040343e
jmp 0x402540
push edi
mov eax, ebx
call fcn.0040343e
mov esi, dword [ebp - 0x58]
push 0xc800
call fcn.004222b8
pop ecx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x24]
push eax
push dword [ebx]
mov eax, ebx
call fcn.00402afe
cmp eax, edi
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x20], edi
jne 0x40258f
mov eax, dword [ebp - 0x24]
cmp eax, edi
jbe 0x4025ea
mov ecx, 0xc800
cmp eax, ecx
jb 0x402577
mov eax, ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
push dword [ebp - 0x10]
mov eax, ebx
push dword [ebx]
call fcn.00402a65
cmp eax, edi
mov dword [ebp - 0xc], eax
je 0x4025e1
cmp eax, 0x2ee2
je 0x4025af
cmp eax, 0x2efe
je 0x4025af
cmp eax, 0x2eff
je 0x4025af
cmp eax, 0x2f83
jne 0x4026f9
cmp dword [ebp - 0x1c], 3
je 0x4025bf
cmp dword [ebp - 0x1c], 4
jne 0x4026f9
lea eax, [ebp - 0x18]
push eax
push esi
push dword [ebp - 0x40]
lea eax, [ebp - 0x50]
call fcn.004029f3
test eax, eax
mov dword [ebp - 0xc], eax
jne 0x4026f7
xor edi, edi
jmp 0x40254e
cmp dword [ebp - 0x20], edi
jne 0x4026b4
cmp dword [ebp - 0x18], edi
jbe 0x4027a4
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, dword [ebp - 0x18]
jae 0x4027a4
cmp dword [ebp - 0x1c], 3
je 0x402614
cmp dword [ebp - 0x1c], 4
jne 0x40271f
lea eax, [ebp - 0x18]
push eax
push esi
push dword [ebp - 0x40]
lea eax, [ebp - 0x50]
call fcn.004029f3
test eax, eax
mov dword [ebp - 0xc], eax
je 0x4025da
cmp eax, 0xe0000008
je 0x402643
mov ebx, dword [ebx + 0x14]
test ebx, ebx
je 0x402643
mov edx, dword [ebx]
push eax
push 0
mov ecx, ebx
call dword [edx + 0x1c]
push dword [ebp - 0x10]
call fcn.004222bd
test esi, esi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
je 0x402659
push esi
call ebx
mov esi, dword [ebp - 0x4c]
lea edi, [ebp - 0x50]
call fcn.0040336d
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
xor edi, edi
cmp dword [ebp - 0x48], edi
je 0x402676
push dword [ebp - 0x48]
call esi
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.0040175b
mov eax, dword [ebp - 8]
call fcn.0040175b
push edi
push dword [ebp - 0x40]
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push dword [ebp - 0x40]
call esi
cmp dword [ebp - 0x38], edi
je 0x4026a2
push dword [ebp - 0x38]
call ebx
cmp dword [ebp - 0x30], edi
je 0x4026ac
push dword [ebp - 0x30]
call ebx
mov eax, dword [ebp - 0xc]
jmp 0x40294c
push edi
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402853
push dword [ebp - 0x28]
mov eax, ebx
call fcn.0040343e
push edi
mov esi, ebx
call fcn.0040349f
mov eax, ebx
call fcn.00403483
test al, al
jne 0x4028de
mov esi, dword [ebp - 0x58]
jmp 0x40254e
xor edi, edi
cmp eax, 0xe0000008
je 0x402710
mov ebx, dword [ebx + 0x14]
cmp ebx, edi
je 0x402710
mov edx, dword [ebx]
push eax
push edi
mov ecx, ebx
call dword [edx + 0x1c]
push dword [ebp - 0x10]
call fcn.004222bd
cmp esi, edi
jmp 0x40264d
mov ecx, dword [ebx + 0x14]
cmp ecx, edi
je 0x402731
mov eax, dword [ecx]
push 0xe000000f
push edi
call dword [eax + 0x1c]
push dword [ebp - 0x10]
call fcn.004222bd
cmp esi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
je 0x402747
push esi
call ebx
mov esi, dword [ebp - 0x4c]
lea edi, [ebp - 0x50]
call fcn.0040336d
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
xor edi, edi
cmp dword [ebp - 0x48], edi
je 0x402764
push dword [ebp - 0x48]
call esi
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.0040175b
mov eax, dword [ebp - 8]
call fcn.0040175b
push edi
push dword [ebp - 0x40]
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push dword [ebp - 0x40]
call esi
cmp dword [ebp - 0x38], edi
je 0x402790
push dword [ebp - 0x38]
call ebx
cmp dword [ebp - 0x30], edi
je 0x40279a
push dword [ebp - 0x30]
call ebx
mov eax, 0xe000000f
jmp 0x40294c
cmp dword [ebp - 0x58], edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4027b7
push dword [ebp - 0x58]
call esi
mov dword [ebp - 0x58], edi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0x14]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov eax, ebx
call fcn.00403472
push dword [ebx + 0x5c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [ebp - 0x10]
call fcn.004222bd
cmp dword [ebp - 0x58], edi
pop ecx
je 0x4027ef
push dword [ebp - 0x58]
call esi
mov esi, dword [ebp - 0x4c]
lea edi, [ebp - 0x50]
call fcn.0040336d
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
xor edi, edi
cmp dword [ebp - 0x48], edi
je 0x40280c
push dword [ebp - 0x48]
call esi
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.0040175b
mov eax, dword [ebp - 8]
call fcn.0040175b
push edi
push dword [ebp - 0x40]
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push dword [ebp - 0x40]
call esi
cmp dword [ebp - 0x38], edi
je 0x40283c
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x30], edi
je 0x40294a
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40294a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebx + 0x14]
cmp ecx, edi
mov dword [ebx + 0x10], eax
je 0x40286a
mov edx, dword [ecx]
push eax
push edi
call dword [edx + 0x1c]
mov eax, dword [ebx + 0x10]
push dword [ebp - 0x10]
mov dword [ebp - 0x1c], eax
call fcn.004222bd
cmp esi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
je 0x402886
push esi
call ebx
mov esi, dword [ebp - 0x4c]
lea edi, [ebp - 0x50]
call fcn.0040336d
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
xor edi, edi
cmp dword [ebp - 0x48], edi
je 0x4028a3
push dword [ebp - 0x48]
call esi
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.0040175b
mov eax, dword [ebp - 8]
call fcn.0040175b
push edi
push dword [ebp - 0x40]
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push dword [ebp - 0x40]
call esi
cmp dword [ebp - 0x38], edi
je 0x4028cf
push dword [ebp - 0x38]
call ebx
cmp dword [ebp - 0x30], edi
je 0x4028d9
push dword [ebp - 0x30]
call ebx
mov eax, dword [ebp - 0x1c]
jmp 0x40294c
push dword [ebp - 0x10]
call fcn.004222bd
cmp dword [ebp - 0x58], edi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
je 0x4028f7
push dword [ebp - 0x58]
call ebx
mov esi, dword [ebp - 0x4c]
lea edi, [ebp - 0x50]
call fcn.0040336d
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
xor edi, edi
cmp dword [ebp - 0x48], edi
je 0x402914
push dword [ebp - 0x48]
call esi
mov eax, dword [ebp - 4]
add eax, 0xfffffff0
call fcn.0040175b
mov eax, dword [ebp - 8]
call fcn.0040175b
push edi
push dword [ebp - 0x40]
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push dword [ebp - 0x40]
call esi
cmp dword [ebp - 0x38], edi
je 0x402940
push dword [ebp - 0x38]
call ebx
cmp dword [ebp - 0x30], edi
je 0x40294a
push dword [ebp - 0x30]
call ebx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret