Function at 0x407207
Capabilities:
Check http status code
Get session user name
Impersonate user
Initialize winhttp library
Prepare http request
Read file on windows
Read http header
Receive http response
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3c44
call fcn.00411ac9
mov eax, dword [0x42e070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
or dword [ebp - 0x3b6c], 0xffffffff
push ebx
mov ebx, dword [ebp + 0x28]
push esi
mov dword [ebp - 0x3ba0], eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x3b80], eax
lea edi, [ebp - 0x3c08]
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x3b68], eax
xor eax, eax
push 8
pop ecx
rep stosd dword es:[edi], eax
mov dword [ebp - 0x3b64], eax
mov dword [ebp - 0x3bc8], eax
mov dword [ebp - 0x3b9c], eax
mov dword [ebp - 0x3b74], eax
mov dword [ebp - 0x3b84], eax
mov dword [ebp - 0x3b58], eax
mov dword [ebp - 0x3b70], eax
mov dword [ebp - 0x3b7c], eax
inc eax
movlpd qword [ebp - 0x3bc0], xmm0
mov dword [ebp - 0x3bcc], 0x100
mov dword [ebp - 0x3c08], 0x20
mov dword [ebp - 0x3c04], eax
call fcn.00405172
mov eax, dword [0x42e898]
lea edx, [ebp - 0x3b64]
push edx
push str.system:write
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov esi, eax
test esi, esi
js 0x407e53
mov esi, 0x25f8
lea eax, [ebp - 0x3b54]
push esi
push 0
push eax
call fcn.0041259b
mov edi, dword [ebp - 0x3b80]
lea ecx, [ebp - 0x3b54]
add esp, 0xc
mov dword [ebp - 0x3b54], esi
mov dword [ebp - 0x3b50], 0x4000000
mov eax, dword [edi]
push ecx
push ebx
push 0
push edi
call dword [eax + 0x1c]
mov esi, eax
test esi, esi
js 0x407e53
mov eax, dword [edi]
push edi
call dword [eax + 0x18]
test eax, eax
je 0x40732a
mov esi, 0x80004004
jmp 0x407e53
push dword [ebp - 0x3ba0]
mov eax, dword [ebx]
push ebx
call dword [eax + 8]
mov dword [ebp - 0x3b98], eax
lea eax, [ebp - 0x3bcc]
push eax
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov ebx, dword [ebp - 0x3ba0]
lea eax, [ebp - 0x104]
mov dword [ebp - 0x3c00], eax
lea eax, [ebp - 0x3c08]
push eax
push ebx
call dword [sym.imp.USERENV.dll_LoadUserProfileA]
mov ecx, dword [ebp - 0x3b9c]
test eax, eax
push 1
pop eax
push ebx
cmovne ecx, eax
push 0
mov dword [ebp - 0x3b9c], ecx
call dword [sym.imp.ADVAPI32.dll_SetThreadToken]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4073af
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e53
mov ecx, dword [ebp - 0x3b98]
xor edx, edx
inc edx
mov dword [ebp - 0x3bc8], edx
cmp ecx, 2
je 0x407a58
cmp ecx, 3
je 0x407a58
cmp ecx, 4
jne 0x407a4e
push 0x38
lea eax, [ebp - 0x3c40]
mov dword [ebp - 0x3b78], 0x824
push 0
push eax
mov byte [ebp - 0x3b5d], 0
call fcn.0041259b
add esp, 0xc
mov dword [ebp - 0x3c44], 0x3c
lea eax, [ebp - 0x30c]
mov ecx, 0x104
mov dword [ebp - 0x3c34], eax
lea eax, [ebp - 0x514]
mov dword [ebp - 0x3c18], eax
lea eax, [ebp - 0x3c44]
push eax
push 0x80000000
push 0
lea eax, [ebp - 0x25a4]
mov dword [ebp - 0x3c30], ecx
push eax
mov dword [ebp - 0x3c14], ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x40746a
call ebx
movzx esi, ax
mov edi, 0x80070000
or esi, edi
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e53
jmp 0x40746f
mov edi, 0x80070000
lea eax, [ebp - 0x3b78]
push eax
lea eax, [ebp - 0x155c]
push eax
push 0x80000000
lea eax, [ebp - 0x3c44]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCreateUrl]
test eax, eax
jne 0x4074a7
call ebx
movzx esi, ax
or esi, edi
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e53
xor eax, eax
push eax
push eax
push eax
push eax
push 0x425a04
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x3b74], eax
test eax, eax
jne 0x4074d6
call ebx
movzx esi, ax
or esi, edi
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e53
xor eax, eax
mov dword [ebp - 0x3b5c], eax
mov edi, eax
and dword [ebp - 0x3bc4], 0
and dword [ebp - 0x3b94], 0
mov dword [ebp - 0x3bd0], 4
test edi, edi
je 0x407503
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x3b84]
test eax, eax
je 0x407514
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push 0
push 0
lea eax, [ebp - 0x30c]
push eax
push dword [ebp - 0x3b74]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x3b84], eax
test eax, eax
jne 0x407553
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e59
mov eax, dword [ebp - 0x3b84]
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
lea ecx, [ebp - 0x514]
push ecx
push 0x425d04
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
mov dword [ebp - 0x3b58], edi
test edi, edi
jne 0x407590
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e59
xor ecx, ecx
mov ebx, ecx
xor eax, eax
mov dword [ebp - 0x3b90], ecx
lea edi, [ebp - 0x3bb0]
mov dword [ebp - 0x3b8c], ecx
stosd dword es:[edi], eax
xor edx, edx
inc edx
mov dword [ebp - 0x3b88], ecx
mov dword [ebp - 0x3be8], edx
mov dword [ebp - 0x3be4], 3
stosd dword es:[edi], eax
mov dword [ebp - 0x3be0], ecx
mov dword [ebp - 0x3bdc], ecx
mov dword [ebp - 0x3bd8], ecx
stosd dword es:[edi], eax
mov dword [ebp - 0x3bd4], edx
stosd dword es:[edi], eax
mov eax, ebx
mov edi, ecx
sub eax, ecx
je 0x407687
sub eax, edx
je 0x407602
sub eax, edx
jne 0x4076ff
mov dword [ebp - 0x3b90], edx
mov edi, edx
jmp 0x4076e8
lea eax, [ebp - 0x3bb0]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpGetIEProxyConfigForCurrentUser]
test eax, eax
je 0x4076ff
cmp dword [ebp - 0x3ba8], 0
je 0x4076ff
push 0x208
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 0x208
push 0
mov dword [ebp - 0x3b8c], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [ebp - 0x3b8c]
mov dword [ebp - 0x3b88], eax
test ecx, ecx
je 0x4076ff
test eax, eax
je 0x4076ff
push 0xffffffffffffffff
push dword [ebp - 0x3ba8]
mov dword [ebp - 0x3b90], 3
push 0x104
push ecx
call fcn.00416833
add esp, 0x10
xor eax, eax
lea edi, [eax + 1]
jmp 0x4076e8
lea eax, [ebp - 0x3bb0]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpGetIEProxyConfigForCurrentUser]
test eax, eax
je 0x4076ff
cmp dword [ebp - 0x3bb0], 0
je 0x4076ff
mov eax, dword [ebp - 0x3bac]
test eax, eax
je 0x4076b8
or dword [ebp - 0x3be8], 2
mov dword [ebp - 0x3be0], eax
xor eax, eax
inc eax
mov dword [ebp - 0x3bd4], eax
lea eax, [ebp - 0x3b90]
push eax
lea eax, [ebp - 0x3be8]
push eax
lea eax, [ebp - 0x155c]
push eax
push dword [ebp - 0x3b74]
call dword [sym.imp.WINHTTP.dll_WinHttpGetProxyForUrl]
mov edi, eax
test edi, edi
je 0x4076ff
push 0xc
lea eax, [ebp - 0x3b90]
push eax
push 0x26
push dword [ebp - 0x3b74]
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
cmp dword [ebp - 0x3bac], 0
je 0x40771b
push dword [ebp - 0x3bac]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
and dword [ebp - 0x3bac], 0
cmp dword [ebp - 0x3ba8], 0
je 0x407737
push dword [ebp - 0x3ba8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
and dword [ebp - 0x3ba8], 0
cmp dword [ebp - 0x3ba4], 0
je 0x407753
push dword [ebp - 0x3ba4]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
and dword [ebp - 0x3ba4], 0
mov ecx, dword [ebp - 0x3b8c]
test ecx, ecx
je 0x40776e
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor ecx, ecx
mov dword [ebp - 0x3b8c], ecx
jmp 0x407770
xor ecx, ecx
mov eax, dword [ebp - 0x3b88]
test eax, eax
je 0x407789
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor ecx, ecx
mov dword [ebp - 0x3b88], ecx
test edi, edi
mov edi, dword [ebp - 0x3b58]
je 0x4077aa
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x40791a
xor ecx, ecx
inc ebx
cmp ebx, 3
jb 0x407594
mov al, byte [ebp - 0x3b5d]
test al, al
jne 0x4077c6
test esi, esi
js 0x407e59
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x4077db
test esi, esi
js 0x407e59
lea eax, [ebp - 0x3b94]
push eax
lea eax, [ebp - 0x3bd0]
push eax
lea eax, [ebp - 0x3bc4]
push eax
push 0
push 0x20000013
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x407820
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e59
mov eax, dword [ebp - 0x3bc4]
cmp eax, 0x194
ja 0x407932
je 0x407990
cmp eax, 0xc8
je 0x407928
cmp eax, 0x12c
jbe 0x407986
cmp eax, 0x12f
ja 0x40796e
and dword [ebp - 0x3b94], 0
lea eax, [ebp - 0x3b94]
push eax
lea eax, [ebp - 0x3b78]
mov dword [ebp - 0x3b78], 0x824
push eax
lea eax, [ebp - 0x155c]
push eax
push 0
push 0x33
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x4078a5
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e59
lea eax, [ebp - 0x3c44]
push eax
push 0
push 0
lea eax, [ebp - 0x155c]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x4078d9
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e59
lea eax, [ebp - 0x3b78]
push eax
lea eax, [ebp - 0x155c]
push eax
push 0x80000000
lea eax, [ebp - 0x3c44]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCreateUrl]
test eax, eax
jne 0x407915
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e59
xor eax, eax
inc eax
jmp 0x40792a
xor eax, eax
inc eax
mov byte [ebp - 0x3b5d], al
jmp 0x4077ba
xor eax, eax
mov dword [ebp - 0x3b5c], eax
jmp 0x407960
cmp eax, 0x198
je 0x407955
cmp eax, 0x1f4
je 0x407990
cmp eax, 0x1f5
jbe 0x407986
cmp eax, 0x1f7
jbe 0x407990
cmp eax, 0x1f8
jne 0x407986
mov eax, dword [ebp - 0x3b5c]
mov esi, 0x80070102
test esi, esi
jne 0x40799a
test eax, eax
jne 0x4074e0
jmp 0x4079a0
cmp eax, 0x191
je 0x40797c
cmp eax, 0x193
jne 0x407986
mov esi, 0x80070005
jmp 0x407e59
mov esi, 0x8000ffff
jmp 0x407e59
mov esi, 0x80070002
jmp 0x407e59
js 0x407e59
lea eax, [ebp - 0x3bb8]
push eax
push edi
call fcn.00410722
mov esi, eax
test esi, esi
js 0x407e59
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x4079f1
mov eax, dword [ebp - 0x3bb4]
cmp eax, dword [ecx + 4]
jb 0x407a10
jne 0x4079d5
mov eax, dword [ebp - 0x3bb8]
cmp eax, dword [ecx]
jbe 0x407a10
mov ecx, dword [ebp - 0x3b80]
push 0
push 0
push 0
mov eax, dword [ecx]
push 0
push ecx
call dword [eax + 0x50]
xorps xmm0, xmm0
movlpd qword [ebp + 0x10], xmm0
lea eax, [ebp - 0x3bc0]
push eax
push edi
call fcn.004107b5
mov esi, eax
test esi, esi
js 0x407e59
mov edi, dword [ebp + 0x10]
jmp 0x407b6c
xor edi, edi
cmp dword [ebp + 0x24], edi
jbe 0x407e51
mov eax, dword [ebp - 0x3b68]
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 3
push dword [eax + edi*4]
push dword [ebp - 0x3b64]
call fcn.0040d821
mov esi, eax
test esi, esi
js 0x407e53
inc edi
cmp edi, dword [ebp + 0x24]
jb 0x407a1b
jmp 0x407e51
mov esi, 0x8007000f
jmp 0x407e53
mov eax, 0x8000080
cmp ecx, 2
jne 0x407a6b
cmp dword [0x42e8a4], 0
je 0x407a79
cmp ecx, 3
jne 0x407a7e
cmp dword [0x42e8ac], 0
jne 0x407a7e
mov eax, 0x28000080
push 0
push eax
push 3
push 0
push edx
push 0x80000000
lea eax, [ebp - 0x25a4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3b6c], eax
cmp eax, 0xffffffff
jne 0x407ac1
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e53
mov eax, dword [ebp - 0x3b6c]
lea ecx, [ebp - 0x3bb8]
push ecx
push eax
call fcn.0040f699
mov esi, eax
test esi, esi
js 0x407e53
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x407b12
mov eax, dword [ebp - 0x3bb4]
cmp eax, dword [ecx + 4]
jb 0x407c41
jne 0x407afe
mov eax, dword [ebp - 0x3bb8]
cmp eax, dword [ecx]
jbe 0x407c41
mov eax, dword [edi]
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push edi
call dword [eax + 0x50]
xorps xmm0, xmm0
movlpd qword [ebp + 0x10], xmm0
lea eax, [ebp - 0x3bc0]
push eax
push dword [ebp - 0x3b6c]
call fcn.0040e240
mov esi, eax
test esi, esi
js 0x407e53
mov edx, dword [ebp + 0x14]
mov edi, dword [ebp + 0x10]
test edx, edx
jl 0x407b6f
jg 0x407b3e
test edi, edi
je 0x407b6f
push 0
push 0
push edx
push edi
push dword [ebp - 0x3b6c]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x407b6c
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e53
mov edx, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x24]
xor eax, eax
mov dword [ebp - 0x3b5c], eax
test ebx, ebx
je 0x407bc0
mov ecx, dword [ebp - 0x3b68]
lea esi, [ebp - 0x3bb8]
push esi
push edx
push edi
mov eax, dword [ecx + eax*4]
push dword [ebp - 0x3bbc]
push dword [ebp - 0x3bc0]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x24]
mov esi, eax
test esi, esi
js 0x407e53
mov eax, dword [ebp - 0x3b5c]
mov edx, dword [ebp + 0x14]
inc eax
mov dword [ebp - 0x3b5c], eax
cmp eax, ebx
jb 0x407b7e
xor edx, edx
cmp dword [ebp - 0x3bc0], edx
jne 0x407c7f
cmp dword [ebp - 0x3bbc], edx
jne 0x407c7f
mov edi, edx
test ebx, ebx
je 0x407e51
push edx
push edx
push 0xffffffffffffffff
xor eax, eax
push 0xffffffffffffffff
inc eax
push eax
mov eax, dword [ebp - 0x3b68]
push dword [eax + edi*4]
push dword [ebp - 0x3b64]
call fcn.0040d821
mov esi, eax
test esi, esi
js 0x407e53
mov eax, dword [ebp - 0x3b68]
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 2
push dword [eax + edi*4]
push dword [ebp - 0x3b64]
call fcn.0040d821
mov esi, eax
test esi, esi
js 0x407e53
inc edi
push 0
pop edx
cmp edi, ebx
jb 0x407be4
jmp 0x407e51
xor edi, edi
cmp dword [ebp + 0x24], edi
jbe 0x407c76
mov eax, dword [ebp - 0x3b68]
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 3
push dword [eax + edi*4]
push dword [ebp - 0x3b64]
call fcn.0040d821
mov esi, eax
test esi, esi
js 0x407e53
inc edi
cmp edi, dword [ebp + 0x24]
jb 0x407c48
xor esi, esi
mov edi, esi
jmp 0x407e59
mov eax, dword [ebp - 0x3b98]
dec eax
sub eax, 1
je 0x407cac
sub eax, 1
je 0x407ca4
sub eax, 1
je 0x407c9c
mov edi, 0x10000
jmp 0x407cc2
mov edi, dword [0x42e8b8]
jmp 0x407cb2
mov edi, dword [0x42e8b0]
jmp 0x407cb2
mov edi, dword [0x42e8a8]
mov ecx, dword [0x42e89c]
dec edi
add edi, ecx
lea eax, [ecx - 1]
not eax
and edi, eax
push 4
push 0x3000
push edi
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x3b70], eax
test eax, eax
jne 0x407e18
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e53
jmp 0x407e18
mov ecx, dword [ebp - 0x3b80]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x18]
test eax, eax
jne 0x407e22
mov eax, dword [ebp - 0x3b98]
cmp eax, 2
je 0x407d40
cmp eax, 3
je 0x407d40
lea eax, [ebp - 0x3b7c]
push eax
push edi
push dword [ebp - 0x3b70]
push dword [ebp - 0x3b58]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
jmp 0x407d5c
push 0
lea eax, [ebp - 0x3b7c]
push eax
push edi
push dword [ebp - 0x3b70]
push dword [ebp - 0x3b6c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407d7c
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e53
mov ecx, dword [ebp - 0x3b7c]
xor eax, eax
mov dword [ebp - 0x3b5c], eax
test ecx, ecx
je 0x407dda
test ebx, ebx
je 0x407e18
push ecx
push dword [ebp - 0x3b70]
mov ecx, dword [ebp - 0x3b68]
push 0xffffffffffffffff
push 0xffffffffffffffff
push 1
push dword [ecx + eax*4]
push dword [ebp - 0x3b64]
call fcn.0040d821
mov esi, eax
test esi, esi
js 0x407e53
mov eax, dword [ebp - 0x3b5c]
inc eax
mov dword [ebp - 0x3b5c], eax
cmp eax, ebx
jae 0x407e18
mov ecx, dword [ebp - 0x3b7c]
jmp 0x407d96
test ebx, ebx
je 0x407e13
mov ecx, dword [ebp - 0x3b68]
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 2
push dword [ecx + eax*4]
push dword [ebp - 0x3b64]
call fcn.0040d821
mov esi, eax
test esi, esi
js 0x407e53
mov eax, dword [ebp - 0x3b5c]
inc eax
mov dword [ebp - 0x3b5c], eax
cmp eax, ebx
jb 0x407dde
xor eax, eax
lea esi, [eax + 1]
test esi, esi
je 0x407d00
jmp 0x407e51
xor edi, edi
test ebx, ebx
je 0x407e51
mov eax, dword [ebp - 0x3b68]
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 4
push dword [eax + edi*4]
push dword [ebp - 0x3b64]
call fcn.0040d821
mov esi, eax
test esi, esi
js 0x407e53
inc edi
cmp edi, ebx
jb 0x407e28
xor esi, esi
mov edi, dword [ebp - 0x3b58]
mov ecx, dword [ebp - 0x3b80]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x64]
mov eax, dword [ebp - 0x3b70]
test eax, eax
je 0x407e7d
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test edi, edi
je 0x407e88
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x3b84]
test eax, eax
je 0x407e99
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x3b74]
test eax, eax
je 0x407eaa
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x3b6c]
cmp eax, 0xffffffff
je 0x407ebc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3bc8], 0
je 0x407f01
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
jne 0x407f01
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
movzx esi, ax
push 0
or esi, 0x80070000
test eax, eax
push 0
cmovle esi, eax
push 0xc0000015
push esi
call fcn.00410ed5
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [ebp - 0x3b9c], 0
je 0x407f1c
push dword [ebp - 0x3bec]
push dword [ebp - 0x3ba0]
call dword [sym.imp.USERENV.dll_UnloadUserProfile]
mov ecx, dword [ebp - 0x3b64]
test ecx, ecx
je 0x407f2c
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004119c3
mov esp, ebp
pop ebp
ret 0x24