Function at 0x4071b7
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.0041188c
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 [0x42e88c]
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 0x407e03
mov esi, 0x25f8
lea eax, [ebp - 0x3b54]
push esi
push 0
push eax
call fcn.004122f1
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 0x407e03
mov eax, dword [edi]
push edi
call dword [eax + 0x18]
test eax, eax
je 0x4072da
mov esi, 0x80004004
jmp 0x407e03
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 0x40735f
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e03
mov ecx, dword [ebp - 0x3b98]
xor edx, edx
inc edx
mov dword [ebp - 0x3bc8], edx
cmp ecx, 2
je 0x407a08
cmp ecx, 3
je 0x407a08
cmp ecx, 4
jne 0x4079fe
push 0x38
lea eax, [ebp - 0x3c40]
mov dword [ebp - 0x3b78], 0x824
push 0
push eax
mov byte [ebp - 0x3b5d], 0
call fcn.004122f1
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 0x40741a
call ebx
movzx esi, ax
mov edi, 0x80070000
or esi, edi
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e03
jmp 0x40741f
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 0x407457
call ebx
movzx esi, ax
or esi, edi
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e03
xor eax, eax
push eax
push eax
push eax
push eax
push 0x4259dc
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x3b74], eax
test eax, eax
jne 0x407486
call ebx
movzx esi, ax
or esi, edi
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e03
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 0x4074b3
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x3b84]
test eax, eax
je 0x4074c4
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 0x407503
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e09
mov eax, dword [ebp - 0x3b84]
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
lea ecx, [ebp - 0x514]
push ecx
push 0x425cdc
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
mov dword [ebp - 0x3b58], edi
test edi, edi
jne 0x407540
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e09
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 0x407637
sub eax, edx
je 0x4075b2
sub eax, edx
jne 0x4076af
mov dword [ebp - 0x3b90], edx
mov edi, edx
jmp 0x407698
lea eax, [ebp - 0x3bb0]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpGetIEProxyConfigForCurrentUser]
test eax, eax
je 0x4076af
cmp dword [ebp - 0x3ba8], 0
je 0x4076af
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 0x4076af
test eax, eax
je 0x4076af
push 0xffffffffffffffff
push dword [ebp - 0x3ba8]
mov dword [ebp - 0x3b90], 3
push 0x104
push ecx
call fcn.004165bf
add esp, 0x10
xor eax, eax
lea edi, [eax + 1]
jmp 0x407698
lea eax, [ebp - 0x3bb0]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpGetIEProxyConfigForCurrentUser]
test eax, eax
je 0x4076af
cmp dword [ebp - 0x3bb0], 0
je 0x4076af
mov eax, dword [ebp - 0x3bac]
test eax, eax
je 0x407668
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 0x4076af
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 0x4076cb
push dword [ebp - 0x3bac]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
and dword [ebp - 0x3bac], 0
cmp dword [ebp - 0x3ba8], 0
je 0x4076e7
push dword [ebp - 0x3ba8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
and dword [ebp - 0x3ba8], 0
cmp dword [ebp - 0x3ba4], 0
je 0x407703
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 0x40771e
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor ecx, ecx
mov dword [ebp - 0x3b8c], ecx
jmp 0x407720
xor ecx, ecx
mov eax, dword [ebp - 0x3b88]
test eax, eax
je 0x407739
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 0x40775a
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 0x4078ca
xor ecx, ecx
inc ebx
cmp ebx, 3
jb 0x407544
mov al, byte [ebp - 0x3b5d]
test al, al
jne 0x407776
test esi, esi
js 0x407e09
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x40778b
test esi, esi
js 0x407e09
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 0x4077d0
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e09
mov eax, dword [ebp - 0x3bc4]
cmp eax, 0x194
ja 0x4078e2
je 0x407940
cmp eax, 0xc8
je 0x4078d8
cmp eax, 0x12c
jbe 0x407936
cmp eax, 0x12f
ja 0x40791e
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 0x407855
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e09
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 0x407889
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e09
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 0x4078c5
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e09
xor eax, eax
inc eax
jmp 0x4078da
xor eax, eax
inc eax
mov byte [ebp - 0x3b5d], al
jmp 0x40776a
xor eax, eax
mov dword [ebp - 0x3b5c], eax
jmp 0x407910
cmp eax, 0x198
je 0x407905
cmp eax, 0x1f4
je 0x407940
cmp eax, 0x1f5
jbe 0x407936
cmp eax, 0x1f7
jbe 0x407940
cmp eax, 0x1f8
jne 0x407936
mov eax, dword [ebp - 0x3b5c]
mov esi, 0x80070102
test esi, esi
jne 0x40794a
test eax, eax
jne 0x407490
jmp 0x407950
cmp eax, 0x191
je 0x40792c
cmp eax, 0x193
jne 0x407936
mov esi, 0x80070005
jmp 0x407e09
mov esi, 0x8000ffff
jmp 0x407e09
mov esi, 0x80070002
jmp 0x407e09
js 0x407e09
lea eax, [ebp - 0x3bb8]
push eax
push edi
call fcn.00410463
mov esi, eax
test esi, esi
js 0x407e09
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x4079a1
mov eax, dword [ebp - 0x3bb4]
cmp eax, dword [ecx + 4]
jb 0x4079c0
jne 0x407985
mov eax, dword [ebp - 0x3bb8]
cmp eax, dword [ecx]
jbe 0x4079c0
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.004104f6
mov esi, eax
test esi, esi
js 0x407e09
mov edi, dword [ebp + 0x10]
jmp 0x407b1c
xor edi, edi
cmp dword [ebp + 0x24], edi
jbe 0x407e01
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.0040d7de
mov esi, eax
test esi, esi
js 0x407e03
inc edi
cmp edi, dword [ebp + 0x24]
jb 0x4079cb
jmp 0x407e01
mov esi, 0x8007000f
jmp 0x407e03
mov eax, 0x8000080
cmp ecx, 2
jne 0x407a1b
cmp dword [0x42e898], 0
je 0x407a29
cmp ecx, 3
jne 0x407a2e
cmp dword [0x42e8a0], 0
jne 0x407a2e
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 0x407a71
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e03
mov eax, dword [ebp - 0x3b6c]
lea ecx, [ebp - 0x3bb8]
push ecx
push eax
call fcn.0040f3b0
mov esi, eax
test esi, esi
js 0x407e03
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x407ac2
mov eax, dword [ebp - 0x3bb4]
cmp eax, dword [ecx + 4]
jb 0x407bf1
jne 0x407aae
mov eax, dword [ebp - 0x3bb8]
cmp eax, dword [ecx]
jbe 0x407bf1
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.0040e1fa
mov esi, eax
test esi, esi
js 0x407e03
mov edx, dword [ebp + 0x14]
mov edi, dword [ebp + 0x10]
test edx, edx
jl 0x407b1f
jg 0x407aee
test edi, edi
je 0x407b1f
push 0
push 0
push edx
push edi
push dword [ebp - 0x3b6c]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x407b1c
call ebx
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e03
mov edx, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x24]
xor eax, eax
mov dword [ebp - 0x3b5c], eax
test ebx, ebx
je 0x407b70
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 0x407e03
mov eax, dword [ebp - 0x3b5c]
mov edx, dword [ebp + 0x14]
inc eax
mov dword [ebp - 0x3b5c], eax
cmp eax, ebx
jb 0x407b2e
xor edx, edx
cmp dword [ebp - 0x3bc0], edx
jne 0x407c2f
cmp dword [ebp - 0x3bbc], edx
jne 0x407c2f
mov edi, edx
test ebx, ebx
je 0x407e01
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.0040d7de
mov esi, eax
test esi, esi
js 0x407e03
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.0040d7de
mov esi, eax
test esi, esi
js 0x407e03
inc edi
push 0
pop edx
cmp edi, ebx
jb 0x407b94
jmp 0x407e01
xor edi, edi
cmp dword [ebp + 0x24], edi
jbe 0x407c26
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.0040d7de
mov esi, eax
test esi, esi
js 0x407e03
inc edi
cmp edi, dword [ebp + 0x24]
jb 0x407bf8
xor esi, esi
mov edi, esi
jmp 0x407e09
mov eax, dword [ebp - 0x3b98]
dec eax
sub eax, 1
je 0x407c5c
sub eax, 1
je 0x407c54
sub eax, 1
je 0x407c4c
mov edi, 0x10000
jmp 0x407c72
mov edi, dword [0x42e8ac]
jmp 0x407c62
mov edi, dword [0x42e8a4]
jmp 0x407c62
mov edi, dword [0x42e89c]
mov ecx, dword [0x42e890]
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 0x407dc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e03
jmp 0x407dc8
mov ecx, dword [ebp - 0x3b80]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x18]
test eax, eax
jne 0x407dd2
mov eax, dword [ebp - 0x3b98]
cmp eax, 2
je 0x407cf0
cmp eax, 3
je 0x407cf0
lea eax, [ebp - 0x3b7c]
push eax
push edi
push dword [ebp - 0x3b70]
push dword [ebp - 0x3b58]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
jmp 0x407d0c
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 0x407d2c
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407e03
mov ecx, dword [ebp - 0x3b7c]
xor eax, eax
mov dword [ebp - 0x3b5c], eax
test ecx, ecx
je 0x407d8a
test ebx, ebx
je 0x407dc8
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.0040d7de
mov esi, eax
test esi, esi
js 0x407e03
mov eax, dword [ebp - 0x3b5c]
inc eax
mov dword [ebp - 0x3b5c], eax
cmp eax, ebx
jae 0x407dc8
mov ecx, dword [ebp - 0x3b7c]
jmp 0x407d46
test ebx, ebx
je 0x407dc3
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.0040d7de
mov esi, eax
test esi, esi
js 0x407e03
mov eax, dword [ebp - 0x3b5c]
inc eax
mov dword [ebp - 0x3b5c], eax
cmp eax, ebx
jb 0x407d8e
xor eax, eax
lea esi, [eax + 1]
test esi, esi
je 0x407cb0
jmp 0x407e01
xor edi, edi
test ebx, ebx
je 0x407e01
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.0040d7de
mov esi, eax
test esi, esi
js 0x407e03
inc edi
cmp edi, ebx
jb 0x407dd8
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 0x407e2d
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test edi, edi
je 0x407e38
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x3b84]
test eax, eax
je 0x407e49
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x3b74]
test eax, eax
je 0x407e5a
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x3b6c]
cmp eax, 0xffffffff
je 0x407e6c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3bc8], 0
je 0x407eb1
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
jne 0x407eb1
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.00410bcc
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [ebp - 0x3b9c], 0
je 0x407ecc
push dword [ebp - 0x3bec]
push dword [ebp - 0x3ba0]
call dword [sym.imp.USERENV.dll_UnloadUserProfile]
mov ecx, dword [ebp - 0x3b64]
test ecx, ecx
je 0x407edc
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.00411786
mov esp, ebp
pop ebp
ret 0x24