Function at 0x407af4
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
Resolve function by parsing pe exports
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x3c4c
call fcn.00423c98
mov eax, dword [0x42f058]
xor eax, esp
mov dword [esp + 0x3c48], eax
mov eax, dword [ebp + 0x18]
xorps xmm0, xmm0
or dword [esp], 0xffffffff
push ebx
mov ebx, dword [ebp + 0x20]
push esi
push edi
mov dword [esp + 0x38], ecx
lea edi, [esp + 0xa4]
mov dword [esp + 0x20], eax
xor eax, eax
push 8
pop ecx
rep stosd dword es:[edi], eax
mov dword [esp + 0x1c], eax
mov byte [esp + 0x17], al
mov byte [esp + 0x44], al
mov dword [esp + 0x28], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], eax
inc eax
mov dword [esp + 0x34], edx
movlpd qword [esp + 0x48], xmm0
mov dword [esp + 0x80], 0x100
mov dword [esp + 0xa4], 0x20
mov dword [esp + 0xa8], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x43030c], eax
lea edx, [esp + 0x1c]
mov eax, dword [0x430308]
push edx
push str.system:write
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov esi, eax
test esi, esi
js 0x407bfe
mov esi, 0x25f8
lea eax, [esp + 0x100]
push esi
push 0
push eax
call fcn.00412d6c
mov edi, dword [esp + 0x40]
lea ecx, [esp + 0x10c]
add esp, 0xc
mov dword [esp + 0x100], esi
mov dword [esp + 0x104], 0x4000000
mov eax, dword [edi]
push ecx
push ebx
push 0
push edi
call dword [eax + 0x1c]
mov esi, eax
test esi, esi
js 0x407bfe
mov eax, dword [edi]
push edi
call dword [eax + 0x18]
test eax, eax
je 0x407ca2
mov esi, 0x80004004
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0xc]
mov ecx, dword [esp + 0x34]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x64]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x407c26
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test edi, edi
je 0x407c31
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [esp + 0x40]
test eax, eax
je 0x407c40
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x407c4f
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp ebx, 0xffffffff
je 0x407c5b
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [esp + 0x17], 0
je 0x40875a
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
jne 0x40875a
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
mov edx, 0xc0000015
or esi, 0x80070000
test eax, eax
push ecx
cmovle esi, eax
push ebx
push ebx
mov ecx, esi
call fcn.0040227b
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push dword [esp + 0x38]
mov eax, dword [ebx]
push ebx
call dword [eax + 8]
mov ebx, eax
lea eax, [esp + 0x80]
push eax
lea eax, [esp + 0x26fc]
mov dword [esp + 0x80], ebx
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea eax, [esp + 0x26f8]
mov dword [esp + 0xac], eax
lea eax, [esp + 0xa4]
push eax
push dword [esp + 0x3c]
call dword [sym.imp.USERENV.dll_LoadUserProfileA]
mov ecx, dword [esp + 0x44]
test eax, eax
push 1
pop eax
push dword [esp + 0x38]
movzx ecx, cl
cmovne ecx, eax
push 0
mov dword [esp + 0x4c], ecx
call dword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
jne 0x407d2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407bfe
xor ecx, ecx
inc ecx
mov byte [esp + 0x17], cl
cmp ebx, 2
je 0x4083c1
cmp ebx, 3
je 0x4083c1
cmp ebx, 4
jne 0x4083b7
push 0x3c
xor bl, bl
mov dword [esp + 0x30], 0x824
pop edi
mov byte [esp + 0x16], bl
lea eax, [esp + 0xc4]
push edi
xor ebx, ebx
push ebx
push eax
call fcn.00412d6c
add esp, 0xc
mov dword [esp + 0xc4], edi
lea eax, [esp + 0x27f8]
mov ecx, 0x104
mov dword [esp + 0xd4], eax
lea eax, [esp + 0x2a00]
mov dword [esp + 0xf0], eax
lea eax, [esp + 0xc4]
push eax
push 0x80000000
push ebx
lea eax, [esp + 0x16bc]
mov dword [esp + 0xe4], ecx
push eax
mov dword [esp + 0x104], ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x407de7
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
mov edi, 0x80070000
or esi, edi
test eax, eax
cmovle esi, eax
test esi, esi
jns 0x407dec
mov edi, ebx
jmp 0x407c02
mov edi, 0x80070000
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x2c0c]
push eax
push 0x80000000
lea eax, [esp + 0xd0]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCreateUrl]
test eax, eax
jne 0x407e24
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, edi
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407de0
push ebx
push ebx
push ebx
push ebx
push 0x42b98c
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ebx, eax
mov dword [esp + 0x28], ebx
test ebx, ebx
jne 0x407e55
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, edi
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407bfe
mov edi, dword [esp + 0x10]
xor al, al
mov byte [esp + 0x15], al
and dword [esp + 0x78], 0
and dword [esp + 0x3c], 0
mov dword [esp + 0x84], 4
test edi, edi
je 0x407e7f
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [esp + 0x40]
test eax, eax
je 0x407e8e
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push 0
push 0
lea eax, [esp + 0x2800]
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ebx, eax
mov dword [esp + 0x40], ebx
test ebx, ebx
jne 0x407ec7
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407c02
xor eax, eax
push eax
push eax
push eax
push eax
lea eax, [esp + 0x2a10]
push eax
push 0x42bc5c
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
mov dword [esp + 0x10], edi
test edi, edi
jne 0x407f07
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407c02
xor ecx, ecx
mov ebx, ecx
xor eax, eax
mov dword [esp + 0x90], 3
lea edi, [esp + 0x54]
mov dword [esp + 0x94], ecx
stosd dword es:[edi], eax
xor edx, edx
inc edx
mov dword [esp + 0x98], ecx
mov dword [esp + 0x8c], edx
mov dword [esp + 0x9c], ecx
stosd dword es:[edi], eax
mov dword [esp + 0xa0], edx
stosd dword es:[edi], eax
xor eax, eax
lea edi, [esp + 0x60]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, ebx
mov edi, ecx
sub eax, ecx
je 0x407fe9
sub eax, edx
je 0x407f72
sub eax, edx
jne 0x408058
mov dword [esp + 0x54], edx
mov edi, edx
jmp 0x408045
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpGetIEProxyConfigForCurrentUser]
test eax, eax
je 0x408058
cmp dword [esp + 0x68], 0
je 0x408058
push 0x208
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 0x208
push 0
mov dword [esp + 0x60], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x5c], eax
test ecx, ecx
je 0x408058
test eax, eax
je 0x408058
push 0xffffffffffffffff
push dword [esp + 0x6c]
mov dword [esp + 0x5c], 3
push 0x104
push ecx
call fcn.00414a70
add esp, 0x10
xor eax, eax
lea edi, [eax + 1]
jmp 0x408045
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpGetIEProxyConfigForCurrentUser]
test eax, eax
je 0x408058
cmp dword [esp + 0x60], 0
je 0x408058
mov eax, dword [esp + 0x64]
test eax, eax
je 0x408016
or dword [esp + 0x8c], 2
mov dword [esp + 0x94], eax
xor eax, eax
inc eax
mov dword [esp + 0xa0], eax
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x2c10]
push eax
push dword [esp + 0x34]
call dword [sym.imp.WINHTTP.dll_WinHttpGetProxyForUrl]
mov edi, eax
test edi, edi
je 0x408058
push 0xc
lea eax, [esp + 0x58]
push eax
push 0x26
push dword [esp + 0x34]
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
cmp dword [esp + 0x64], 0
je 0x40806e
push dword [esp + 0x64]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
and dword [esp + 0x64], 0
cmp dword [esp + 0x68], 0
je 0x408084
push dword [esp + 0x68]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
and dword [esp + 0x68], 0
cmp dword [esp + 0x6c], 0
je 0x40809a
push dword [esp + 0x6c]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
and dword [esp + 0x6c], 0
mov ecx, dword [esp + 0x58]
test ecx, ecx
je 0x4080b1
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor ecx, ecx
mov dword [esp + 0x58], ecx
jmp 0x4080b3
xor ecx, ecx
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x4080c8
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor ecx, ecx
mov dword [esp + 0x5c], ecx
test edi, edi
mov edi, dword [esp + 0x10]
je 0x4080e7
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 0x408254
xor ecx, ecx
inc ebx
cmp ebx, 3
jb 0x407f0b
mov bl, byte [esp + 0x16]
test bl, bl
jne 0x408101
test esi, esi
js 0x407c02
xor ebx, ebx
push ebx
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x408117
test esi, esi
js 0x407c02
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x88]
push eax
lea eax, [esp + 0x80]
push eax
push ebx
push 0x20000013
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x408159
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407c02
mov eax, dword [esp + 0x78]
cmp eax, 0x194
ja 0x40826a
je 0x4082c9
cmp eax, 0xc8
je 0x408262
cmp eax, 0x12c
jbe 0x4082bf
cmp eax, 0x12f
ja 0x4082a7
lea eax, [esp + 0x3c]
mov dword [esp + 0x2c], 0x824
push eax
lea eax, [esp + 0x30]
mov dword [esp + 0x40], ebx
push eax
lea eax, [esp + 0x2c10]
push eax
push ebx
push 0x33
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x4081d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407c02
lea eax, [esp + 0xc4]
push eax
push ebx
push ebx
lea eax, [esp + 0x2c14]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x40820f
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407c02
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x2c0c]
push eax
push 0x80000000
lea eax, [esp + 0xd0]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCreateUrl]
test eax, eax
jne 0x40824f
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407c02
xor eax, eax
inc eax
jmp 0x408264
xor eax, eax
lea ebx, [eax + 1]
mov byte [esp + 0x16], bl
jmp 0x4080f5
mov al, bl
mov byte [esp + 0x15], al
jmp 0x408296
cmp eax, 0x198
je 0x40828d
cmp eax, 0x1f4
je 0x4082c9
cmp eax, 0x1f5
jbe 0x4082bf
cmp eax, 0x1f7
jbe 0x4082c9
cmp eax, 0x1f8
jne 0x4082bf
mov al, byte [esp + 0x15]
mov esi, 0x80070102
test esi, esi
jne 0x4082d3
test al, al
je 0x4082d9
mov ebx, dword [esp + 0x28]
jmp 0x407e5f
cmp eax, 0x191
je 0x4082b5
cmp eax, 0x193
jne 0x4082bf
mov esi, 0x80070005
jmp 0x407c02
mov esi, 0x8000ffff
jmp 0x407c02
mov esi, 0x80070002
jmp 0x407c02
js 0x407c02
lea edx, [esp + 0x70]
mov ecx, edi
call fcn.004104e9
mov esi, eax
test esi, esi
js 0x407c02
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x408322
mov eax, dword [esp + 0x74]
cmp eax, dword [ecx + 4]
jb 0x408383
jne 0x40830c
mov eax, dword [esp + 0x70]
cmp eax, dword [ecx]
jbe 0x408383
mov ecx, dword [esp + 0x34]
push ebx
push ebx
push ebx
mov eax, dword [ecx]
push ebx
push ecx
call dword [eax + 0x50]
xorps xmm0, xmm0
movlpd qword [ebp + 8], xmm0
push ebx
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 4
push eax
lea eax, [esp + 0x90]
mov esi, ebx
push eax
push ebx
push 0x20000005
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x408367
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407c02
mov eax, dword [esp + 0x88]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ebx
test esi, esi
js 0x407c02
jmp 0x4084fc
mov edi, ebx
cmp dword [ebp + 0x1c], ebx
jbe 0x4083b0
mov eax, dword [esp + 0x20]
push ebx
push ebx
push ecx
mov edx, dword [eax + edi*4]
push ecx
mov ecx, dword [esp + 0x2c]
push 3
call fcn.0040d770
mov esi, eax
test esi, esi
js 0x407bfe
inc edi
cmp edi, dword [ebp + 0x1c]
jb 0x40838a
mov esi, ebx
jmp 0x407bfe
mov esi, 0x8007000f
jmp 0x407bfe
mov eax, 0x8000080
cmp ebx, 2
jne 0x4083d4
cmp dword [0x43031c], 0
je 0x4083e2
cmp ebx, 3
jne 0x4083e7
cmp dword [0x430324], 0
jne 0x4083e7
mov eax, 0x28000080
push 0
push eax
push 3
push 0
push ecx
push 0x80000000
lea eax, [esp + 0x16c8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0xc], ebx
cmp ebx, 0xffffffff
jne 0x408429
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x408751
lea edx, [esp + 0x70]
mov ecx, ebx
call fcn.0040f3cf
mov esi, eax
test esi, esi
js 0x408751
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40846c
mov eax, dword [esp + 0x74]
cmp eax, dword [ecx + 4]
jb 0x4084c2
jne 0x408458
mov eax, dword [esp + 0x70]
cmp eax, dword [ecx]
jbe 0x4084c2
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 + 8], xmm0
lea edx, [esp + 0x48]
mov ecx, ebx
call fcn.0040e16d
mov esi, eax
test esi, esi
js 0x408751
mov eax, dword [ebp + 0xc]
test eax, eax
jl 0x4084fa
mov edi, dword [ebp + 8]
jg 0x408491
test edi, edi
je 0x4084be
push 0
push 0
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x4084be
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x408751
xor ebx, ebx
jmp 0x4084ff
xor edi, edi
cmp dword [ebp + 0x1c], edi
jbe 0x4084f1
mov eax, dword [esp + 0x20]
push 0
push 0
push ecx
mov edx, dword [eax + edi*4]
push ecx
mov ecx, dword [esp + 0x2c]
push 3
call fcn.0040d770
mov esi, eax
test esi, esi
js 0x408751
inc edi
cmp edi, dword [ebp + 0x1c]
jb 0x4084c9
xor esi, esi
mov edi, esi
jmp 0x407c06
xor ebx, ebx
mov edi, dword [ebp + 8]
mov eax, ebx
mov ebx, dword [ebp + 0x1c]
mov dword [esp + 0x18], eax
test ebx, ebx
je 0x408541
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x70]
push edx
push dword [ebp + 0xc]
mov eax, dword [ecx + eax*4]
push edi
push dword [esp + 0x58]
push dword [esp + 0x58]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x24]
mov esi, eax
test esi, esi
js 0x407bfe
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + 0x18], eax
cmp eax, ebx
jb 0x40850c
cmp dword [esp + 0x48], 0
jne 0x4085a9
cmp dword [esp + 0x4c], 0
jne 0x4085a9
xor edi, edi
test ebx, ebx
je 0x40874a
push 0
push 0
push ecx
xor eax, eax
push ecx
mov ecx, dword [esp + 0x2c]
inc eax
push eax
mov eax, dword [esp + 0x34]
mov edx, dword [eax + edi*4]
call fcn.0040d770
mov esi, eax
test esi, esi
js 0x407bfe
mov eax, dword [esp + 0x20]
push 0
push 0
push ecx
mov edx, dword [eax + edi*4]
push ecx
mov ecx, dword [esp + 0x2c]
push 2
call fcn.0040d770
mov esi, eax
test esi, esi
js 0x407bfe
inc edi
cmp edi, ebx
jb 0x408559
jmp 0x40874a
mov eax, dword [esp + 0x7c]
dec eax
sub eax, 1
je 0x4085d4
sub eax, 1
je 0x4085cc
sub eax, 1
je 0x4085c4
mov edi, 0x10000
jmp 0x4085ea
mov edi, dword [0x430330]
jmp 0x4085da
mov edi, dword [0x430328]
jmp 0x4085da
mov edi, dword [0x430320]
mov ecx, dword [0x430314]
dec edi
add edi, ecx
lea eax, [ecx - 1]
not eax
and edi, eax
push 4
push 0x3000
push edi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [esp + 0x24], eax
test eax, eax
jne 0x408713
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407bfe
jmp 0x408713
mov ecx, dword [esp + 0x34]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x18]
test eax, eax
jne 0x40871d
mov eax, dword [esp + 0x7c]
cmp eax, 2
je 0x40865d
cmp eax, 3
je 0x40865d
lea eax, [esp + 0x30]
push eax
push edi
push dword [esp + 0x2c]
push dword [esp + 0x1c]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
jmp 0x408673
push 0
lea eax, [esp + 0x34]
push eax
push edi
push dword [esp + 0x30]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x408693
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x407bfe
mov ecx, dword [esp + 0x30]
xor eax, eax
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x4086db
test ebx, ebx
je 0x408713
push ecx
push dword [esp + 0x28]
push ecx
push ecx
mov ecx, dword [esp + 0x30]
push 1
mov edx, dword [ecx + eax*4]
mov ecx, dword [esp + 0x30]
call fcn.0040d770
mov esi, eax
test esi, esi
js 0x407bfe
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + 0x18], eax
cmp eax, ebx
jae 0x408713
mov ecx, dword [esp + 0x30]
jmp 0x4086a5
test ebx, ebx
je 0x40870e
push 0
push 0
push ecx
push ecx
mov ecx, dword [esp + 0x30]
push 2
mov edx, dword [ecx + eax*4]
mov ecx, dword [esp + 0x30]
call fcn.0040d770
mov esi, eax
test esi, esi
js 0x407bfe
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + 0x18], eax
cmp eax, ebx
jb 0x4086df
xor eax, eax
lea esi, [eax + 1]
test esi, esi
je 0x408627
jmp 0x40874a
xor edi, edi
test ebx, ebx
je 0x40874a
mov eax, dword [esp + 0x20]
push 0
push 0
push ecx
mov edx, dword [eax + edi*4]
push ecx
mov ecx, dword [esp + 0x2c]
push 4
call fcn.0040d770
mov esi, eax
test esi, esi
js 0x407bfe
inc edi
cmp edi, ebx
jb 0x408723
xor esi, esi
jmp 0x407bfe
mov edi, dword [esp + 0x10]
jmp 0x407c06
cmp byte [esp + 0x44], 0
je 0x408772
push dword [esp + 0xc0]
push dword [esp + 0x3c]
call dword [sym.imp.USERENV.dll_UnloadUserProfile]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x408780
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [esp + 0x3c54]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004116a3
mov esp, ebp
pop ebp
ret 0x1c