Function at 0x40b2b0
Capabilities:
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2218
call fcn.004181c0
mov eax, dword [0x42e460]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push str._ELEMENTAL_URL
push str.http:__api.elementsbrowser.com_download_attachment_version_1.0.55
mov edi, edx
mov dword [ebp - 0x2214], eax
mov esi, ecx
mov dword [ebp - 0x2218], ebx
mov dword [ebp - 0x2210], 0
mov dword [ebp - 0x2208], 0x100
mov dword [0x4331d8], ebx
mov dword [eax], 0
mov dword [0x4331e4], 1
call fcn.00412030
add esp, 8
test eax, eax
jne 0x40b339
push 0x200
push str.http:__api.elementsbrowser.com_download_attachment_elements.bin
push 0xffffffffffffffff
push str.http:__api.elementsbrowser.com_download_attachment_version_1.0.55
push eax
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp word [str.http:__api.elementsbrowser.com_download_attachment_elements.bin], 0
jne 0x40b347
xor ecx, ecx
jmp 0x40b35f
mov ecx, str.http:__api.elementsbrowser.com_download_attachment_elements.bin
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b350
sub ecx, edx
sar ecx, 1
push ecx
push str.http:__api.elementsbrowser.com_download_attachment_elements.bin
mov ecx, 0x431b80
call fcn.00401d00
push 3
push 0x84000300
push 0
push 0
push str.http:__api.elementsbrowser.com_download_attachment_elements.bin
push esi
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
test esi, esi
je 0x40b3eb
lea eax, [ebp - 0x2210]
push eax
lea eax, [ebp - 0x2208]
push eax
lea eax, [ebp - 0x204]
push eax
push 0x13
push esi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov ecx, 0x42aca0
lea eax, [ebp - 0x204]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40b3db
test dx, dx
je 0x40b3d7
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40b3db
add eax, 4
add ecx, 4
test dx, dx
jne 0x40b3b5
xor eax, eax
jmp 0x40b3e0
sbb eax, eax
or eax, 1
test eax, eax
je 0x40b3fe
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004112f8
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x40af00
push 0x64
push 1
push ebx
mov dword [0x4331e0], eax
call dword [sym.imp.USER32.dll_SetTimer]
push 0x2000
mov dword [0x4331dc], eax
lea eax, [ebp - 0x2204]
push 0
push eax
call fcn.004181f0
add esp, 0xc
mov dword [ebp - 0x2208], 0
mov ecx, edi
call fcn.0040b1b0
mov edi, eax
cmp edi, 0xffffffff
je 0x40b3eb
lea eax, [ebp - 0x2208]
mov bl, 1
push eax
push 0x2000
lea eax, [ebp - 0x2204]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40b4e5
lea esp, [esp]
mov eax, dword [ebp - 0x2208]
test eax, eax
je 0x40b4e5
cmp byte [0x432ff2], 0
jne 0x40b4e5
push 0
lea ecx, [ebp - 0x220c]
push ecx
push eax
lea eax, [ebp - 0x2204]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x2208]
cmp eax, dword [ebp - 0x220c]
jne 0x40b4d7
mov ecx, dword [ebp - 0x2214]
add dword [0x4331e4], eax
add dword [ecx], eax
lea eax, [ebp - 0x2208]
push eax
push 0x2000
lea eax, [ebp - 0x2204]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40b470
jmp 0x40b4e5
mov eax, dword [ebp - 0x2214]
xor bl, bl
mov dword [eax], 0
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x2214]
cmp dword [eax], 0x2160ec0
jae 0x40b50f
xor eax, eax
movzx ebx, bl
cmp byte [0x432ff2], al
cmove ebx, eax
push dword [0x4331dc]
push dword [ebp - 0x2218]
call dword [sym.imp.USER32.dll_KillTimer]
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004112f8
mov esp, ebp
pop ebp
ret