Function at 0x402010
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.00401cf3
mov eax, esi
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00403795
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.00401cf3
mov eax, esi
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00403795
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.00403731
mov esi, eax
test esi, esi
je 0x4020e8
mov ebx, dword [ebx + 0x14]
test ebx, ebx
je 0x4020c9
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 0x4020d6
push edi
call ebx
cmp dword [ebp - 0x30], 0
je 0x4020e1
push dword [ebp - 0x30]
call ebx
mov eax, esi
jmp 0x402924
lea edi, [ebp - 0x20]
lea eax, [ebp - 0x18]
mov ecx, ebx
call fcn.0040370d
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 0x401eff
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 0x402194
mov ecx, dword [ebx + 0x14]
xor edi, edi
cmp ecx, edi
mov eax, 0xe0000005
mov dword [ebx + 0x10], eax
je 0x402156
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 0x402183
push dword [ebp - 0x38]
call esi
cmp dword [ebp - 0x30], edi
je 0x40218d
push dword [ebp - 0x30]
call esi
mov eax, ebx
jmp 0x402924
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.00401d3c
push eax
push edi
lea eax, [ebp - 4]
push eax
call fcn.00401c90
mov cl, 1
mov eax, ebx
call fcn.00403524
and dword [ebp - 0x10], 0
cmp byte [ebx + 0x40], 0
je 0x4021dd
lea eax, [ebp - 4]
call fcn.004050a5
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.00402929
mov dword [ebp - 0xc], eax
mov eax, ebx
call fcn.00403558
test al, al
je 0x402244
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 0x402231
push dword [ebp - 0x38]
call esi
cmp dword [ebp - 0x30], ebx
je 0x402462
push dword [ebp - 0x30]
call esi
jmp 0x402462
cmp dword [ebp - 0xc], 0
je 0x4022a9
cmp dword [ebp - 0xc], 0xe0000013
je 0x402266
mov ebx, dword [ebx + 0x14]
test ebx, ebx
je 0x402266
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 0x402296
push dword [ebp - 0x38]
call esi
cmp dword [ebp - 0x30], ebx
je 0x402684
push dword [ebp - 0x30]
call esi
jmp 0x402684
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.00403502
mov eax, ebx
call fcn.00403558
test al, al
jne 0x4022e2
xor edi, edi
cmp esi, edi
jbe 0x402344
cmp esi, dword [ebp - 0x10]
jne 0x402344
mov eax, ebx
call fcn.00403547
mov esi, ebx
lea edi, [ebp - 0x50]
call fcn.00403442
cmp dword [ebp - 0x48], 0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x4022fd
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 0x402331
push dword [ebp - 0x38]
call esi
cmp dword [ebp - 0x30], edi
je 0x402922
push dword [ebp - 0x30]
call esi
jmp 0x402922
push edi
lea eax, [ebp - 4]
push edi
push eax
call fcn.0040dd10
add esp, 0xc
cmp eax, edi
mov dword [ebp - 0xc], eax
je 0x4023be
mov ecx, dword [ebx + 0x14]
cmp ecx, edi
je 0x402367
mov edx, dword [ecx]
push eax
push edi
call dword [edx + 0x1c]
lea edi, [ebp - 0x50]
mov esi, ebx
call fcn.00403442
cmp dword [ebp - 0x48], 0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x402382
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 0x4023b6
push dword [ebp - 0x38]
call esi
cmp dword [ebp - 0x30], edi
jmp 0x402299
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.00403d1d
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x58], eax
jne 0x4024ee
mov eax, ebx
call fcn.00403558
test al, al
je 0x40246c
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [ebp - 0x50]
mov esi, ebx
call fcn.00403442
cmp dword [ebp - 0x48], 0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x402422
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 0x402454
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x30], edi
je 0x402462
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe0000008
jmp 0x402924
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebx + 0x14]
cmp ecx, edi
mov dword [ebp - 0x20], eax
je 0x402483
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.00403442
cmp dword [ebp - 0x48], 0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x4024a6
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 0x4024d8
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x30], edi
je 0x4024e6
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
jmp 0x402924
cmp dword [ebp - 0x10], edi
jbe 0x40250d
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.00403513
jmp 0x402518
push edi
mov eax, ebx
call fcn.00403513
mov esi, dword [ebp - 0x58]
push 0xc800
call fcn.0042382d
pop ecx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x24]
push eax
push dword [ebx]
mov eax, ebx
call fcn.00402aa8
cmp eax, edi
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x20], edi
jne 0x402567
mov eax, dword [ebp - 0x24]
cmp eax, edi
jbe 0x4025c2
mov ecx, 0xc800
cmp eax, ecx
jb 0x40254f
mov eax, ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
push dword [ebp - 0x10]
mov eax, ebx
push dword [ebx]
call fcn.00402a0f
cmp eax, edi
mov dword [ebp - 0xc], eax
je 0x4025b9
cmp eax, 0x2ee2
je 0x402587
cmp eax, 0x2efe
je 0x402587
cmp eax, 0x2eff
je 0x402587
cmp eax, 0x2f83
jne 0x4026d1
cmp dword [ebp - 0x1c], 3
je 0x402597
cmp dword [ebp - 0x1c], 4
jne 0x4026d1
lea eax, [ebp - 0x18]
push eax
push esi
push dword [ebp - 0x40]
lea eax, [ebp - 0x50]
call fcn.0040299d
test eax, eax
mov dword [ebp - 0xc], eax
jne 0x4026cf
xor edi, edi
jmp 0x402526
cmp dword [ebp - 0x20], edi
jne 0x40268c
cmp dword [ebp - 0x18], edi
jbe 0x40277c
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, dword [ebp - 0x18]
jae 0x40277c
cmp dword [ebp - 0x1c], 3
je 0x4025ec
cmp dword [ebp - 0x1c], 4
jne 0x4026f7
lea eax, [ebp - 0x18]
push eax
push esi
push dword [ebp - 0x40]
lea eax, [ebp - 0x50]
call fcn.0040299d
test eax, eax
mov dword [ebp - 0xc], eax
je 0x4025b2
cmp eax, 0xe0000008
je 0x40261b
mov ebx, dword [ebx + 0x14]
test ebx, ebx
je 0x40261b
mov edx, dword [ebx]
push eax
push 0
mov ecx, ebx
call dword [edx + 0x1c]
push dword [ebp - 0x10]
call fcn.00423832
test esi, esi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
je 0x402631
push esi
call ebx
mov esi, dword [ebp - 0x4c]
lea edi, [ebp - 0x50]
call fcn.00403442
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
xor edi, edi
cmp dword [ebp - 0x48], edi
je 0x40264e
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 0x40267a
push dword [ebp - 0x38]
call ebx
cmp dword [ebp - 0x30], edi
je 0x402684
push dword [ebp - 0x30]
call ebx
mov eax, dword [ebp - 0xc]
jmp 0x402924
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 0x40282b
push dword [ebp - 0x28]
mov eax, ebx
call fcn.00403513
push edi
mov esi, ebx
call fcn.00403574
mov eax, ebx
call fcn.00403558
test al, al
jne 0x4028b6
mov esi, dword [ebp - 0x58]
jmp 0x402526
xor edi, edi
cmp eax, 0xe0000008
je 0x4026e8
mov ebx, dword [ebx + 0x14]
cmp ebx, edi
je 0x4026e8
mov edx, dword [ebx]
push eax
push edi
mov ecx, ebx
call dword [edx + 0x1c]
push dword [ebp - 0x10]
call fcn.00423832
cmp esi, edi
jmp 0x402625
mov ecx, dword [ebx + 0x14]
cmp ecx, edi
je 0x402709
mov eax, dword [ecx]
push 0xe000000f
push edi
call dword [eax + 0x1c]
push dword [ebp - 0x10]
call fcn.00423832
cmp esi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
je 0x40271f
push esi
call ebx
mov esi, dword [ebp - 0x4c]
lea edi, [ebp - 0x50]
call fcn.00403442
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
xor edi, edi
cmp dword [ebp - 0x48], edi
je 0x40273c
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 0x402768
push dword [ebp - 0x38]
call ebx
cmp dword [ebp - 0x30], edi
je 0x402772
push dword [ebp - 0x30]
call ebx
mov eax, 0xe000000f
jmp 0x402924
cmp dword [ebp - 0x58], edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x40278f
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.00403547
push dword [ebx + 0x5c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [ebp - 0x10]
call fcn.00423832
cmp dword [ebp - 0x58], edi
pop ecx
je 0x4027c7
push dword [ebp - 0x58]
call esi
mov esi, dword [ebp - 0x4c]
lea edi, [ebp - 0x50]
call fcn.00403442
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
xor edi, edi
cmp dword [ebp - 0x48], edi
je 0x4027e4
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 0x402814
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x30], edi
je 0x402922
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402922
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebx + 0x14]
cmp ecx, edi
mov dword [ebx + 0x10], eax
je 0x402842
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.00423832
cmp esi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
je 0x40285e
push esi
call ebx
mov esi, dword [ebp - 0x4c]
lea edi, [ebp - 0x50]
call fcn.00403442
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
xor edi, edi
cmp dword [ebp - 0x48], edi
je 0x40287b
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 0x4028a7
push dword [ebp - 0x38]
call ebx
cmp dword [ebp - 0x30], edi
je 0x4028b1
push dword [ebp - 0x30]
call ebx
mov eax, dword [ebp - 0x1c]
jmp 0x402924
push dword [ebp - 0x10]
call fcn.00423832
cmp dword [ebp - 0x58], edi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
je 0x4028cf
push dword [ebp - 0x58]
call ebx
mov esi, dword [ebp - 0x4c]
lea edi, [ebp - 0x50]
call fcn.00403442
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
xor edi, edi
cmp dword [ebp - 0x48], edi
je 0x4028ec
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 0x402918
push dword [ebp - 0x38]
call ebx
cmp dword [ebp - 0x30], edi
je 0x402922
push dword [ebp - 0x30]
call ebx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret