Function at 0x1002176
Capabilities:
Enumerate files on windows
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x280
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push edi
push ebx
mov dword [ebp - 0x280], eax
mov eax, dword [ebp + 0xc]
push ebx
mov edi, 0x100132c
push edi
mov dword [ebp - 0x274], eax
mov dword [ebp - 0x264], ebx
mov dword [ebp - 0x26c], ebx
mov dword [ebp - 0x25c], ebx
mov dword [ebp - 0x27c], ebx
mov dword [ebp - 0x260], ebx
mov dword [ebp - 0x258], ebx
mov dword [ebp - 0x268], ebx
call esi
mov dword [ebp - 0x278], eax
cmp eax, ebx
je 0x1002239
lea eax, [eax + eax + 0x14]
push eax
mov dword [ebp - 0x270], eax
call fcn.0100457f
mov dword [ebp - 0x260], eax
cmp eax, ebx
jne 0x1002208
xor eax, eax
inc eax
jmp 0x1002621
push dword [ebp - 0x278]
push eax
push edi
call esi
push dword [ebp - 0x270]
call fcn.0100457f
mov dword [ebp - 0x258], eax
cmp dword [ebp - 0x260], ebx
jne 0x1002239
lea eax, [ebp - 0x260]
push eax
call fcn.0100485a
jmp 0x1002200
mov edi, dword [ebp - 0x280]
push ebx
push edi
call fcn.01004462
mov esi, eax
add esi, 0xf
lea eax, [esi + esi]
push eax
call fcn.0100457f
mov dword [ebp - 0x264], eax
cmp eax, ebx
jne 0x1002278
lea eax, [ebp - 0x268]
push eax
call fcn.0100485a
lea eax, [ebp - 0x258]
push eax
call fcn.0100485a
jmp 0x100222b
push eax
call fcn.01004628
mov ecx, dword [ebp - 0x264]
cmp eax, ebx
je 0x100228e
mov byte [ecx], bl
inc ecx
dec eax
jne 0x1002288
push ebx
push edi
call fcn.01004462
dec esi
cmp word [edi + eax*2 - 2], 0x5c
push edi
je 0x10022a6
push 0x100131c
jmp 0x10022ab
push 0x1001310
push esi
push dword [ebp - 0x264]
call fcn.01002001
add esp, 0x10
push ebx
push ebx
push ebx
lea eax, [ebp - 0x254]
push eax
push ebx
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov dword [ebp - 0x278], eax
cmp eax, 0xffffffff
je 0x10025f2
push ebx
push edi
call fcn.01004462
mov esi, eax
push ebx
lea eax, [ebp - 0x228]
push eax
call fcn.01004462
lea edi, [esi + eax + 0xa]
lea esi, [edi + edi]
push esi
call fcn.0100457f
mov dword [ebp - 0x26c], eax
cmp eax, ebx
je 0x10025b2
cmp esi, ebx
je 0x100231b
mov byte [eax], bl
inc eax
dec esi
jne 0x1002315
mov esi, dword [ebp - 0x280]
push ebx
push esi
call fcn.01004462
cmp word [esi + eax*2 - 2], 0x5c
lea eax, [ebp - 0x228]
push eax
push esi
je 0x100233f
push 0x1001304
jmp 0x1002344
push 0x10012f8
push edi
push dword [ebp - 0x26c]
call fcn.01002001
add esp, 0x14
test byte [ebp - 0x254], 0x10
je 0x1002367
lea eax, [ebp - 0x26c]
jmp 0x100258a
push ebx
lea eax, [ebp - 0x228]
push eax
call fcn.01004462
lea eax, [eax + eax + 0x14]
push eax
call fcn.0100457f
mov dword [ebp - 0x25c], eax
cmp eax, ebx
je 0x10025b2
push eax
call fcn.01004628
shr eax, 1
push eax
lea eax, [ebp - 0x228]
push eax
push dword [ebp - 0x25c]
call fcn.01004bf4
push ebx
mov esi, 0x10012f4
push esi
push dword [ebp - 0x274]
call fcn.01004b84
test eax, eax
je 0x10023e8
push ebx
push esi
push dword [ebp - 0x25c]
call fcn.01004b84
test eax, eax
jne 0x10023e8
push dword [ebp - 0x25c]
call fcn.01004628
shr eax, 1
push eax
push esi
push dword [ebp - 0x25c]
call fcn.01004c37
push dword [ebp - 0x25c]
push dword [ebp - 0x274]
call fcn.010014c5
test eax, eax
je 0x1002420
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 0x26c]
call fcn.01002060
mov dword [ebp - 0x27c], 1
jmp 0x1002578
push dword [ebp - 0x258]
call fcn.01004628
shr eax, 1
push eax
push dword [ebp - 0x260]
push dword [ebp - 0x258]
call fcn.01004bf4
mov edi, dword [ebp - 0x258]
push ebx
push 0x10012f0
push edi
call fcn.01004b84
cmp eax, ebx
je 0x1002470
push ebx
xor ecx, ecx
push edi
mov word [eax], cx
call fcn.01004462
lea eax, [edi + eax*2 + 2]
mov dword [ebp - 0x270], eax
jmp 0x1002564
mov edi, dword [ebp - 0x258]
mov dword [ebp - 0x270], ebx
jmp 0x1002564
push ebx
push dword [ebp - 0x274]
call fcn.01004462
push ebx
push edi
mov esi, eax
call fcn.01004462
lea esi, [esi + eax + 0x19]
lea eax, [esi + esi]
push eax
call fcn.0100457f
mov dword [ebp - 0x268], eax
cmp eax, ebx
je 0x10025c3
push eax
call fcn.01004628
mov ecx, dword [ebp - 0x268]
cmp eax, ebx
je 0x10024c7
mov byte [ecx], bl
inc ecx
dec eax
jne 0x10024c1
cmp word [edi], 0x2e
jne 0x100251c
push edi
push dword [ebp - 0x274]
dec esi
push 0x10012f8
push esi
push dword [ebp - 0x268]
call fcn.01002001
add esp, 0x14
push dword [ebp - 0x25c]
push dword [ebp - 0x268]
call fcn.010014c5
test eax, eax
je 0x100251c
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 0x26c]
call fcn.01002060
mov dword [ebp - 0x27c], 1
mov edi, dword [ebp - 0x270]
cmp edi, ebx
jne 0x100252a
xor edi, edi
jmp 0x1002558
push ebx
push 0x10012f0
push edi
call fcn.01004b84
cmp eax, ebx
je 0x1002552
push ebx
xor ecx, ecx
push edi
mov word [eax], cx
call fcn.01004462
lea eax, [edi + eax*2 + 2]
mov dword [ebp - 0x270], eax
jmp 0x1002558
mov dword [ebp - 0x270], ebx
lea eax, [ebp - 0x268]
push eax
call fcn.0100485a
cmp edi, ebx
jne 0x1002481
lea eax, [ebp - 0x25c]
push eax
call fcn.0100485a
lea eax, [ebp - 0x26c]
push eax
call fcn.0100485a
lea eax, [ebp - 0x25c]
push eax
call fcn.0100485a
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x278]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x10025e6
mov edi, dword [ebp - 0x280]
jmp 0x10022e0
lea eax, [ebp - 0x264]
push eax
call fcn.0100485a
jmp 0x100225e
lea eax, [ebp - 0x258]
push eax
call fcn.0100485a
lea eax, [ebp - 0x260]
push eax
call fcn.0100485a
lea eax, [ebp - 0x25c]
jmp 0x1002231
push dword [ebp - 0x278]
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp - 0x264]
push eax
call fcn.0100485a
lea eax, [ebp - 0x258]
push eax
call fcn.0100485a
lea eax, [ebp - 0x260]
push eax
call fcn.0100485a
xor eax, eax
cmp dword [ebp - 0x27c], ebx
sete al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01003bc6
leave
ret 0x14