Function at 0x458320
Capabilities:
Enumerate files on windows
Query environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x563675
mov eax, dword fs:[0]
push eax
sub esp, 0x594
mov eax, dword [0x5cc5b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x570], eax
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.00505070
push 8
mov dword [ebp - 0x56c], 0
mov dword [ebp - 0x568], 0
mov dword [ebp - 0x564], 0
mov dword [ebp - 0x560], 0
mov dword [ebp - 0x55c], 0
call fcn.00503ec5
add esp, 0x10
test eax, eax
jne 0x4583ba
call fcn.004d9845
mov dword [ebp - 0x56c], eax
lea ecx, [ebp - 0x56c]
mov dword [eax], 0
mov dword [eax + 4], 0
mov eax, dword [ebp - 0x56c]
mov dword [eax], ecx
xor eax, eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x264], 7
mov dword [ebp - 0x268], 0
mov word [ebp - 0x278], ax
mov dword [ebp - 0x2f4], 7
mov dword [ebp - 0x2f8], eax
mov word [ebp - 0x308], ax
push 0x104
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 2
push eax
push str._PROGRAMFILES_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4585f2
mov ax, word [ebp - 0x218]
cmp ax, 0x25
je 0x4585f2
cmp word [ebp - 0x212], 0
lea ecx, [ebp - 0x212]
je 0x458484
lea ebx, [ebx]
movzx edx, word [ecx]
cmp edx, 0x5c
je 0x458478
cmp edx, 0x2f
je 0x458478
add ecx, 2
cmp word [ecx], 0
jne 0x458460
jmp 0x458484
xor eax, eax
mov word [ecx], ax
mov ax, word [ebp - 0x218]
xor ecx, ecx
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], cx
test ax, ax
je 0x4584bf
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4584b0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x230]
call fcn.00441d80
mov eax, dword [ebp - 0x55c]
mov edx, dword [ebp - 0x564]
inc eax
mov byte [ebp - 4], 3
cmp edx, eax
ja 0x4584fa
push 1
lea ecx, [ebp - 0x56c]
call fcn.0045d3c0
mov edx, dword [ebp - 0x564]
mov ecx, dword [ebp - 0x560]
dec edx
mov eax, dword [ebp - 0x55c]
and ecx, edx
mov esi, dword [ebp - 0x568]
add eax, ecx
and edx, eax
mov dword [ebp - 0x560], ecx
lea edi, [edx*4]
cmp dword [edi + esi], 0
jne 0x45854a
push 0x18
call fcn.00503ec5
mov ecx, eax
add esp, 4
test ecx, ecx
jne 0x45853b
call fcn.004d9845
mov eax, dword [ebp - 0x568]
mov dword [edi + eax], ecx
mov esi, dword [ebp - 0x568]
mov esi, dword [edi + esi]
test esi, esi
je 0x4585cf
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
cmp dword [ebp - 0x21c], 8
jae 0x45858b
mov eax, dword [ebp - 0x220]
inc eax
je 0x45859d
add eax, eax
push eax
lea eax, [ebp - 0x230]
push eax
push esi
call fcn.00502230
add esp, 0xc
jmp 0x45859d
mov eax, dword [ebp - 0x230]
mov dword [esi], eax
mov dword [ebp - 0x230], 0
mov eax, dword [ebp - 0x220]
xor ecx, ecx
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x21c]
mov dword [esi + 0x14], eax
mov eax, 7
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], cx
jmp 0x4585d5
mov eax, dword [ebp - 0x21c]
inc dword [ebp - 0x55c]
mov byte [ebp - 4], 2
cmp eax, 8
jb 0x4585f2
push dword [ebp - 0x230]
call fcn.00503a69
add esp, 4
push 0x104
lea eax, [ebp - 0x218]
push eax
push str._PROGRAMFILES_x86__
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4587c3
mov ax, word [ebp - 0x218]
cmp ax, 0x25
je 0x4587c3
cmp word [ebp - 0x212], 0
lea ecx, [ebp - 0x212]
je 0x458656
movzx edx, word [ecx]
cmp edx, 0x5c
je 0x45864a
cmp edx, 0x2f
je 0x45864a
add ecx, 2
cmp word [ecx], 0
jne 0x458632
jmp 0x458656
xor eax, eax
mov word [ecx], ax
mov ax, word [ebp - 0x218]
xor ecx, ecx
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], cx
test ax, ax
je 0x458690
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x458681
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x230]
call fcn.00441d80
mov eax, dword [ebp - 0x55c]
mov edx, dword [ebp - 0x564]
inc eax
mov byte [ebp - 4], 4
cmp edx, eax
ja 0x4586cb
push 1
lea ecx, [ebp - 0x56c]
call fcn.0045d3c0
mov edx, dword [ebp - 0x564]
mov ecx, dword [ebp - 0x560]
dec edx
mov eax, dword [ebp - 0x55c]
and ecx, edx
mov esi, dword [ebp - 0x568]
add eax, ecx
and edx, eax
mov dword [ebp - 0x560], ecx
lea edi, [edx*4]
cmp dword [edi + esi], 0
jne 0x45871b
push 0x18
call fcn.00503ec5
mov ecx, eax
add esp, 4
test ecx, ecx
jne 0x45870c
call fcn.004d9845
mov eax, dword [ebp - 0x568]
mov dword [edi + eax], ecx
mov esi, dword [ebp - 0x568]
mov esi, dword [edi + esi]
test esi, esi
je 0x4587a0
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
cmp dword [ebp - 0x21c], 8
jae 0x45875c
mov eax, dword [ebp - 0x220]
inc eax
je 0x45876e
add eax, eax
push eax
lea eax, [ebp - 0x230]
push eax
push esi
call fcn.00502230
add esp, 0xc
jmp 0x45876e
mov eax, dword [ebp - 0x230]
mov dword [esi], eax
mov dword [ebp - 0x230], 0
mov eax, dword [ebp - 0x220]
xor ecx, ecx
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x21c]
mov dword [esi + 0x14], eax
mov eax, 7
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], cx
jmp 0x4587a6
mov eax, dword [ebp - 0x21c]
inc dword [ebp - 0x55c]
mov byte [ebp - 4], 2
cmp eax, 8
jb 0x4587c3
push dword [ebp - 0x230]
call fcn.00503a69
add esp, 4
lea ecx, [ebp - 0x5a0]
call fcn.0044cf40
lea ecx, [ebp - 0x588]
mov byte [ebp - 4], 5
call fcn.0044cf40
cmp dword [ebx + 0x14], 8
mov byte [ebp - 4], 6
jb 0x4587eb
mov eax, dword [ebx]
jmp 0x4587ed
mov eax, ebx
lea ecx, [ebp - 0x5a0]
push ecx
push eax
call fcn.004591e0
add esp, 8
test al, al
je 0x458e28
lea eax, [ebp - 0x588]
push eax
lea eax, [ebp - 0x5a0]
push eax
call fcn.00457710
add esp, 8
test al, al
je 0x458e28
xor eax, eax
mov dword [ebp - 0x234], 7
push 0xffffffffffffffff
push eax
push ebx
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x238], 0
mov word [ebp - 0x248], ax
call fcn.00442140
push 1
push 0xffffffffffffffff
push 0x5b75b4
lea ecx, [ebp - 0x248]
mov byte [ebp - 4], 7
call fcn.00453a70
cmp eax, 0xffffffff
je 0x4588e5
push 0xffffffffffffffff
inc eax
lea ecx, [ebp - 0x248]
push eax
lea eax, [ebp - 0x260]
push eax
call fcn.004546e0
mov esi, eax
lea eax, [ebp - 0x248]
cmp eax, esi
je 0x4588ce
cmp dword [ebp - 0x234], 8
jb 0x4588a5
push dword [ebp - 0x248]
call fcn.00503a69
add esp, 4
xor eax, eax
mov dword [ebp - 0x234], 7
push esi
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x238], 0
mov word [ebp - 0x248], ax
call fcn.00440af0
cmp dword [ebp - 0x24c], 8
jb 0x4588e5
push dword [ebp - 0x260]
call fcn.00503a69
add esp, 4
push 1
push 0xffffffffffffffff
push 0x5688cc
lea ecx, [ebp - 0x248]
call fcn.00453a70
cmp eax, 0xffffffff
je 0x458976
push eax
push 0
lea eax, [ebp - 0x260]
push eax
lea ecx, [ebp - 0x248]
call fcn.004546e0
mov esi, eax
lea eax, [ebp - 0x248]
cmp eax, esi
je 0x45895f
cmp dword [ebp - 0x234], 8
jb 0x458936
push dword [ebp - 0x248]
call fcn.00503a69
add esp, 4
xor eax, eax
mov dword [ebp - 0x234], 7
push esi
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x238], 0
mov word [ebp - 0x248], ax
call fcn.00440af0
cmp dword [ebp - 0x24c], 8
jb 0x458976
push dword [ebp - 0x260]
call fcn.00503a69
add esp, 4
lea eax, [ebp - 0x248]
push eax
call fcn.00459350
add esp, 4
cmp dword [ebp - 0x55c], 0
je 0x458df4
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x4589a0
lea eax, [ebp - 0x224]
push eax
lea ecx, [ebp - 0x56c]
call fcn.0045d720
mov edx, eax
mov eax, dword [edx]
test eax, eax
je 0x4589bc
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [eax + 4]
dec ecx
and ecx, dword [edx + 8]
mov eax, dword [eax + ecx*4]
lea ecx, [ebp - 0x278]
cmp ecx, eax
je 0x4589dd
push 0xffffffffffffffff
push 0
push eax
call fcn.00442140
mov ecx, dword [ebp - 0x564]
mov eax, dword [ebp - 0x568]
dec ecx
and ecx, dword [ebp - 0x560]
mov esi, dword [eax + ecx*4]
cmp dword [esi + 0x14], 8
jb 0x458a03
push dword [esi]
call fcn.00503a69
add esp, 4
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
dec dword [ebp - 0x55c]
jne 0x458a26
mov dword [ebp - 0x560], eax
jmp 0x458a2c
inc dword [ebp - 0x560]
push 0x568bd4
lea eax, [ebp - 0x278]
push eax
lea eax, [ebp - 0x2c0]
push eax
call fcn.00442cb0
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x458a4f
mov eax, dword [eax]
lea ecx, [ebp - 0x558]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp dword [ebp - 0x2ac], 8
mov edi, eax
jb 0x458a76
push dword [ebp - 0x2c0]
call fcn.00503a69
add esp, 4
xor eax, eax
mov dword [ebp - 0x2ac], 7
mov dword [ebp - 0x2b0], 0
mov word [ebp - 0x2c0], ax
cmp edi, 0xffffffff
je 0x458de7
lea esp, [esp]
mov eax, dword [ebp - 0x558]
test al, 0x10
je 0x458dbb
test eax, 0x400
jne 0x458dbb
mov ecx, 0x5688cc
lea eax, [ebp - 0x52c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x458aea
test dx, dx
je 0x458ae6
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x458aea
add eax, 4
add ecx, 4
test dx, dx
jne 0x458ac4
xor eax, eax
jmp 0x458aef
sbb eax, eax
or eax, 1
test eax, eax
je 0x458dbb
mov ecx, 0x5688d0
lea eax, [ebp - 0x52c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x458b28
test dx, dx
je 0x458b24
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x458b28
add eax, 4
add ecx, 4
test dx, dx
jne 0x458b02
xor eax, eax
jmp 0x458b2d
sbb eax, eax
or eax, 1
test eax, eax
je 0x458dbb
mov eax, str.ca_certs
lea ecx, [ebp - 0x52c]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x458b66
test dx, dx
je 0x458b62
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x458b66
add ecx, 4
add eax, 4
test dx, dx
jne 0x458b40
xor eax, eax
jmp 0x458b6b
sbb eax, eax
or eax, 1
test eax, eax
lea eax, [ebp - 0x278]
push 0x5b75b4
push eax
lea eax, [ebp - 0x290]
push eax
jne 0x458d2b
call fcn.00442cb0
lea ecx, [ebp - 0x52c]
mov byte [ebp - 4], 8
push ecx
push eax
lea eax, [ebp - 0x2d8]
push eax
call fcn.0044d330
push 0x5b75b4
push eax
lea eax, [ebp - 0x2a8]
mov byte [ebp - 4], 9
push eax
call fcn.0044d330
lea ecx, [ebp - 0x248]
mov byte [ebp - 4], 0xa
push ecx
push eax
lea eax, [ebp - 0x2f0]
push eax
call fcn.0044d300
push str..pem
push eax
lea eax, [ebp - 0x260]
mov byte [ebp - 4], 0xb
push eax
call fcn.0044d330
add esp, 0x3c
cmp dword [ebp - 0x2dc], 8
jb 0x458c01
push dword [ebp - 0x2f0]
call fcn.00503a69
add esp, 4
xor eax, eax
mov dword [ebp - 0x2dc], 7
mov dword [ebp - 0x2e0], 0
mov word [ebp - 0x2f0], ax
cmp dword [ebp - 0x294], 8
jb 0x458c35
push dword [ebp - 0x2a8]
call fcn.00503a69
add esp, 4
xor eax, eax
mov dword [ebp - 0x294], 7
mov dword [ebp - 0x298], 0
mov word [ebp - 0x2a8], ax
cmp dword [ebp - 0x2c4], 8
jb 0x458c69
push dword [ebp - 0x2d8]
call fcn.00503a69
add esp, 4
xor eax, eax
mov dword [ebp - 0x2c4], 7
mov dword [ebp - 0x2c8], 0
mov word [ebp - 0x2d8], ax
cmp dword [ebp - 0x27c], 8
mov byte [ebp - 4], 0x10
jb 0x458ca1
push dword [ebp - 0x290]
call fcn.00503a69
add esp, 4
xor eax, eax
mov dword [ebp - 0x27c], 7
cmp dword [ebp - 0x24c], 8
mov word [ebp - 0x290], ax
lea eax, [ebp - 0x260]
cmovae eax, dword [ebp - 0x260]
push 0x568c74
push eax
mov dword [ebp - 0x280], 0
call fcn.00505b47
mov esi, eax
add esp, 8
test esi, esi
je 0x458d0f
push esi
lea ecx, [ebp - 0x588]
call fcn.0044d280
push eax
push 1
lea ecx, [ebp - 0x588]
call fcn.0046d4f0
push eax
call fcn.00503c46
push esi
call fcn.00503e3c
add esp, 0x14
cmp dword [ebp - 0x24c], 8
mov byte [ebp - 4], 7
jb 0x458daa
push dword [ebp - 0x260]
jmp 0x458da2
call fcn.00442cb0
lea ecx, [ebp - 0x52c]
mov byte [ebp - 4], 0x11
push ecx
push eax
lea eax, [ebp - 0x260]
push eax
call fcn.0044d330
add esp, 0x18
push eax
lea ecx, [ebp - 0x56c]
mov byte [ebp - 4], 0x12
call fcn.00459280
cmp dword [ebp - 0x24c], 8
jb 0x458d72
push dword [ebp - 0x260]
call fcn.00503a69
add esp, 4
xor eax, eax
mov dword [ebp - 0x24c], 7
cmp dword [ebp - 0x27c], 8
mov dword [ebp - 0x250], 0
mov word [ebp - 0x260], ax
mov byte [ebp - 4], 7
jb 0x458daa
push dword [ebp - 0x290]
call fcn.00503a69
add esp, 4
mov esi, dword [ebp - 0x570]
push 0
push esi
call ebx
test eax, eax
je 0x458dd7
jmp 0x458dc1
mov esi, dword [ebp - 0x570]
lea eax, [ebp - 0x558]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x458aa0
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0
push esi
call ebx
test eax, eax
je 0x458df4
cmp dword [ebp - 0x55c], 0
jne 0x4589a0
cmp dword [ebp - 0x234], 8
jb 0x458e0b
push dword [ebp - 0x248]
call fcn.00503a69
add esp, 4
xor eax, eax
mov dword [ebp - 0x234], 7
mov dword [ebp - 0x238], 0
mov word [ebp - 0x248], ax
lea ecx, [ebp - 0x588]
mov byte [ebp - 4], 5
call fcn.0044cf70
lea ecx, [ebp - 0x5a0]
mov byte [ebp - 4], 2
call fcn.0044cf70
cmp dword [ebp - 0x264], 8
jb 0x458e5d
push dword [ebp - 0x278]
call fcn.00503a69
add esp, 4
xor eax, eax
mov dword [ebp - 0x264], 7
lea ecx, [ebp - 0x56c]
mov dword [ebp - 0x268], 0
mov word [ebp - 0x278], ax
call fcn.00457670
push dword [ebp - 0x56c]
call fcn.00503a69
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00501f35
mov esp, ebp
pop ebp
ret