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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x298
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 - 0x274], eax
mov eax, dword [ebp + 0xc]
push ebx
mov edi, 0x100132c
push edi
mov dword [ebp - 0x288], eax
mov dword [ebp - 0x268], ebx
mov dword [ebp - 0x264], ebx
mov dword [ebp - 0x258], ebx
mov dword [ebp - 0x26c], ebx
mov dword [ebp - 0x294], ebx
mov dword [ebp - 0x270], ebx
mov dword [ebp - 0x28c], ebx
mov dword [ebp - 0x260], ebx
mov dword [ebp - 0x25c], ebx
mov dword [ebp - 0x280], ebx
mov dword [ebp - 0x27c], ebx
call esi
mov dword [ebp - 0x278], eax
cmp eax, ebx
je 0x100271e
lea eax, [eax + eax + 0x14]
push eax
mov dword [ebp - 0x290], eax
call fcn.0100457f
mov dword [ebp - 0x260], eax
cmp eax, ebx
jne 0x10026ed
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01003bc6
leave
ret 0x14
push dword [ebp - 0x278]
push eax
push edi
call esi
push dword [ebp - 0x290]
call fcn.0100457f
mov dword [ebp - 0x25c], eax
cmp dword [ebp - 0x260], ebx
jne 0x100271e
lea eax, [ebp - 0x260]
push eax
call fcn.0100485a
jmp 0x10026d9
push dword [ebp - 0x288]
call fcn.01006ed5
lea eax, [eax*4 + 4]
push eax
call fcn.0100457f
mov dword [ebp - 0x27c], eax
cmp eax, ebx
jne 0x100274e
lea eax, [ebp - 0x25c]
push eax
call fcn.0100485a
jmp 0x1002710
push ebx
push dword [ebp - 0x274]
call fcn.01004462
lea eax, [eax + eax + 0xa]
push eax
call fcn.0100457f
mov dword [ebp - 0x258], eax
cmp eax, ebx
je 0x1002740
push eax
call fcn.01004628
mov ecx, dword [ebp - 0x258]
cmp eax, ebx
je 0x1002784
mov byte [ecx], bl
inc ecx
dec eax
jne 0x100277e
push dword [ebp - 0x258]
call fcn.01004628
shr eax, 1
push eax
push dword [ebp - 0x274]
push dword [ebp - 0x258]
call fcn.01004bf4
mov edi, dword [ebp - 0x28c]
push ebx
push dword [ebp - 0x258]
call fcn.01004462
mov esi, eax
add esi, 0xf
lea eax, [esi + esi]
push eax
call fcn.0100457f
mov dword [ebp - 0x268], eax
cmp eax, ebx
je 0x1002ced
lea eax, [esi + esi]
push eax
push ebx
push dword [ebp - 0x268]
call sub.msvcrt.dll_memset
add esp, 0xc
push ebx
push dword [ebp - 0x258]
call fcn.01004462
mov ecx, eax
mov eax, dword [ebp - 0x258]
cmp word [eax + ecx*2 - 2], 0x5c
push eax
je 0x1002808
push 0x100131c
jmp 0x100280d
push 0x1001310
push esi
push dword [ebp - 0x268]
call fcn.01002001
add esp, 0x10
push ebx
push ebx
push ebx
lea eax, [ebp - 0x254]
push eax
push ebx
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov dword [ebp - 0x290], eax
cmp eax, 0xffffffff
je 0x1002c34
mov edi, 0x10012f4
push ebx
push dword [ebp - 0x258]
call fcn.01004462
mov esi, eax
push ebx
lea eax, [ebp - 0x228]
push eax
call fcn.01004462
lea esi, [esi + eax + 0xa]
lea eax, [esi + esi]
push eax
call fcn.0100457f
mov dword [ebp - 0x264], eax
cmp eax, ebx
je 0x1002cfe
push eax
call fcn.01004628
shr eax, 1
mov ecx, dword [ebp - 0x264]
je 0x1002893
mov byte [ecx], bl
inc ecx
dec eax
jne 0x100288d
push ebx
push dword [ebp - 0x258]
call fcn.01004462
mov ecx, eax
mov eax, dword [ebp - 0x258]
cmp word [eax + ecx*2 - 2], 0x5c
lea ecx, [ebp - 0x228]
push ecx
push eax
je 0x10028be
push 0x1001304
jmp 0x10028c3
push 0x10012f8
push esi
push dword [ebp - 0x264]
call fcn.01002001
add esp, 0x14
push ebx
xor esi, esi
inc esi
push esi
push edi
lea eax, [ebp - 0x228]
push eax
call fcn.01004483
test eax, eax
je 0x1002974
push ebx
push esi
push 0x100133c
lea eax, [ebp - 0x228]
push eax
call fcn.01004483
test eax, eax
je 0x1002974
test byte [ebp - 0x254], 0x10
je 0x1002981
push dword [ebp - 0x264]
lea eax, [ebp - 0x28c]
push eax
call fcn.0100157a
cmp eax, esi
jne 0x1002bfb
lea eax, [ebp - 0x258]
push eax
call fcn.0100485a
lea eax, [ebp - 0x268]
push eax
call fcn.0100485a
lea eax, [ebp - 0x264]
push eax
call fcn.0100485a
lea eax, [ebp - 0x25c]
push eax
call fcn.0100485a
lea eax, [ebp - 0x260]
push eax
call fcn.0100485a
push dword [ebp - 0x270]
call fcn.01001fcc
mov eax, esi
jmp 0x10026dc
test byte [ebp - 0x254], 0x10
jne 0x1002bfb
push dword [ebp - 0x288]
call fcn.01006ed5
mov dword [ebp - 0x298], eax
mov dword [ebp - 0x284], ebx
cmp eax, ebx
jbe 0x1002bfb
push ebx
lea eax, [ebp - 0x228]
push eax
call fcn.01004462
lea eax, [eax + eax + 0x14]
push eax
call fcn.0100457f
mov dword [ebp - 0x26c], eax
cmp eax, ebx
je 0x1002d12
mov esi, dword [ebp - 0x284]
push esi
push dword [ebp - 0x288]
call fcn.010074ea
push dword [ebp - 0x26c]
mov dword [ebp - 0x274], eax
call fcn.01004628
shr eax, 1
push eax
lea eax, [ebp - 0x228]
push eax
push dword [ebp - 0x26c]
call fcn.01004bf4
push ebx
push edi
push dword [ebp - 0x274]
call fcn.01004b84
test eax, eax
je 0x1002a39
push ebx
push edi
push dword [ebp - 0x26c]
call fcn.01004b84
test eax, eax
jne 0x1002a39
push dword [ebp - 0x26c]
call fcn.01004628
shr eax, 1
push eax
push edi
push dword [ebp - 0x26c]
call fcn.01004c37
push dword [ebp - 0x26c]
push dword [ebp - 0x274]
call fcn.010014c5
test eax, eax
je 0x1002a79
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 0x264]
call fcn.01002060
mov ecx, dword [ebp - 0x27c]
xor eax, eax
inc eax
mov dword [ebp - 0x294], eax
mov dword [ecx + esi*4], eax
jmp 0x1002bd2
push dword [ebp - 0x25c]
call fcn.01004628
shr eax, 1
push eax
push dword [ebp - 0x260]
push dword [ebp - 0x25c]
call fcn.01004bf4
mov esi, dword [ebp - 0x25c]
push ebx
push 0x10012f0
push esi
call fcn.01004b84
cmp eax, ebx
je 0x1002ac9
push ebx
xor ecx, ecx
push esi
mov word [eax], cx
call fcn.01004462
lea eax, [esi + eax*2 + 2]
mov dword [ebp - 0x278], eax
jmp 0x1002bca
mov esi, dword [ebp - 0x25c]
mov dword [ebp - 0x278], ebx
jmp 0x1002bca
push ebx
push esi
call fcn.01004462
push ebx
push dword [ebp - 0x274]
mov edi, eax
call fcn.01004462
lea edi, [edi + eax + 0x19]
lea eax, [edi + edi]
push eax
call fcn.0100457f
mov dword [ebp - 0x280], eax
cmp eax, ebx
je 0x1002d52
push eax
call fcn.01004628
mov ecx, dword [ebp - 0x280]
cmp eax, ebx
je 0x1002b20
mov byte [ecx], bl
inc ecx
dec eax
jne 0x1002b1a
cmp word [esi], 0x2e
jne 0x1002b82
push esi
push dword [ebp - 0x274]
push 0x10012f8
push edi
push dword [ebp - 0x280]
call fcn.01002001
add esp, 0x14
push dword [ebp - 0x26c]
push dword [ebp - 0x280]
call fcn.010014c5
test eax, eax
je 0x1002b82
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 0x264]
call fcn.01002060
mov ecx, dword [ebp - 0x27c]
mov edx, dword [ebp - 0x284]
xor eax, eax
inc eax
mov dword [ebp - 0x294], eax
mov dword [ecx + edx*4], eax
mov esi, dword [ebp - 0x278]
cmp esi, ebx
jne 0x1002b90
xor esi, esi
jmp 0x1002bbe
push ebx
push 0x10012f0
push esi
call fcn.01004b84
cmp eax, ebx
je 0x1002bb8
push ebx
xor ecx, ecx
push esi
mov word [eax], cx
call fcn.01004462
lea eax, [esi + eax*2 + 2]
mov dword [ebp - 0x278], eax
jmp 0x1002bbe
mov dword [ebp - 0x278], ebx
lea eax, [ebp - 0x280]
push eax
call fcn.0100485a
cmp esi, ebx
jne 0x1002ada
lea eax, [ebp - 0x26c]
push eax
call fcn.0100485a
inc dword [ebp - 0x284]
mov eax, dword [ebp - 0x284]
mov edi, 0x10012f4
cmp eax, dword [ebp - 0x298]
jb 0x10029a0
lea eax, [ebp - 0x264]
push eax
call fcn.0100485a
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x290]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1002847
push dword [ebp - 0x290]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [ebp - 0x28c]
lea eax, [ebp - 0x258]
push eax
call fcn.0100485a
lea eax, [ebp - 0x268]
push eax
call fcn.0100485a
mov edx, dword [ebp - 0x270]
cmp edx, ebx
jne 0x1002c5c
cmp edi, ebx
je 0x1002c81
jmp 0x1002c73
cmp edi, ebx
je 0x1002c81
mov eax, edi
lea ecx, [edi + 4]
jmp 0x1002c6c
mov eax, dword [ecx]
lea ecx, [eax + 4]
cmp dword [ecx], ebx
jne 0x1002c67
mov dword [eax + 4], edx
mov dword [ebp - 0x270], edi
xor edi, edi
mov dword [ebp - 0x28c], edi
lea eax, [ebp - 0x258]
push eax
lea eax, [ebp - 0x270]
push eax
call fcn.010015e8
test eax, eax
jne 0x10027a9
lea eax, [ebp - 0x280]
push eax
call fcn.0100485a
lea eax, [ebp - 0x25c]
push eax
call fcn.0100485a
lea eax, [ebp - 0x260]
push eax
call fcn.0100485a
push dword [ebp - 0x270]
call fcn.01001fcc
cmp dword [ebp - 0x294], ebx
jne 0x1002dae
xor ebx, ebx
inc ebx
lea eax, [ebp - 0x27c]
push eax
call fcn.0100485a
mov eax, ebx
jmp 0x10026dc
lea eax, [ebp - 0x258]
push eax
call fcn.0100485a
jmp 0x1002740
lea eax, [ebp - 0x258]
push eax
call fcn.0100485a
lea eax, [ebp - 0x268]
jmp 0x1002cf3
lea eax, [ebp - 0x258]
push eax
call fcn.0100485a
lea eax, [ebp - 0x268]
push eax
call fcn.0100485a
lea eax, [ebp - 0x25c]
push eax
call fcn.0100485a
lea eax, [ebp - 0x260]
push eax
call fcn.0100485a
push dword [ebp - 0x270]
call fcn.01001fcc
jmp 0x10026d9
lea eax, [ebp - 0x258]
push eax
call fcn.0100485a
lea eax, [ebp - 0x268]
push eax
call fcn.0100485a
lea eax, [ebp - 0x27c]
push eax
call fcn.0100485a
lea eax, [ebp - 0x25c]
push eax
call fcn.0100485a
lea eax, [ebp - 0x260]
push eax
call fcn.0100485a
lea eax, [ebp - 0x25c]
push eax
call fcn.0100485a
lea eax, [ebp - 0x260]
push eax
call fcn.0100485a
lea eax, [ebp - 0x26c]
jmp 0x1002d3c
push dword [ebp - 0x288]
call fcn.01006ed5
mov esi, eax
xor edi, edi
cmp esi, ebx
jbe 0x1002cda
mov eax, dword [ebp - 0x27c]
cmp dword [eax + edi*4], ebx
jne 0x1002dff
push edi
push dword [ebp - 0x288]
call fcn.010074ea
cmp dword [ebp + 0x10], ebx
jne 0x1002dff
push eax
push 0x40
call fcn.01005b24
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 1
add eax, 0x40
push 1
push eax
call fcn.010059d1
add esp, 0x14
inc edi
cmp edi, esi
jb 0x1002dc5
jmp 0x1002cda