Function at 0x4aec40
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94c
mov eax, dword [0x517930]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
lea esi, [ebp - 0x404]
mov dword [ebp - 0x948], ebx
push edi
sub esi, ecx
lea ecx, [ecx]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x4aec70
lea edi, [ebp - 0x404]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x4aec84
mov ax, word [str.23metsy]
mov esi, edx
mov word [edi], ax
lea esp, [esp]
mov al, byte [edx]
inc edx
test al, al
jne 0x4aeca0
lea edi, [ebp - 0x404]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4aecb0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
jmp 0x4aecd0
mov al, byte [ebp + ecx - 0x404]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x805], al
test al, al
jne 0x4aecd0
lea ecx, [ebp - 0x404]
dec ecx
lea esp, [esp]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4aecf0
cmp dword [0x522124], 0
mov ax, word [0x4d27fc]
mov word [ecx], ax
mov al, byte [0x4d27fe]
mov byte [ecx + 2], al
jne 0x4aed2d
push 1
push 1
push 1
call dword [sym.imp.libnspr4.dll_PR_Init]
add esp, 0xc
mov dword [0x522124], 1
push 0x1b0
push 0x2c
push ebx
call dword [sym.imp.libnspr4.dll_PR_Open]
mov ebx, eax
add esp, 0xc
mov dword [ebp - 0x94c], ebx
test ebx, ebx
jne 0x4aed84
push str.cant_open_file_n
call fcn.004b6bad
add eax, 0x40
push eax
call fcn.004b97ec
push dword [ebp - 0x948]
push str.GetApplicationPEM:_cant_open_file:
call fcn.004ae990
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b5580
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x948]
push str.GetApplicationPEM:_Opened_file
call fcn.004aea50
add esp, 8
lea eax, [ebp - 0x944]
push eax
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4aedf6
push ebx
call dword [sym.imp.libnspr4.dll_PR_Close]
add esp, 4
push str.cant_find_file_n
call fcn.004b6bad
add eax, 0x40
push eax
call fcn.004b97ec
lea eax, [ebp - 0x404]
push eax
push str.GetApplicationPEM:_cant_find_file:
call fcn.004ae990
add esp, 0x10
or eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b5580
mov esp, ebp
pop ebp
ret
call fcn.004aec20
test byte [ebp - 0x944], 0x10
mov ebx, eax
mov dword [ebp - 0x948], ebx
je 0x4aee23
lea eax, [ebp - 0x918]
push eax
lea eax, [ebp - 0x804]
push eax
push ebx
call fcn.004af930
add esp, 0xc
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileA]
lea eax, [ebp - 0x944]
push eax
push esi
call edi
test eax, eax
je 0x4aee65
test byte [ebp - 0x944], 0x10
je 0x4aee57
lea eax, [ebp - 0x918]
push eax
lea eax, [ebp - 0x804]
push eax
push ebx
call fcn.004af930
add esp, 0xc
lea eax, [ebp - 0x944]
push eax
push esi
call edi
test eax, eax
jne 0x4aee37
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [ebx]
test edi, edi
je 0x4aeeb9
mov ebx, dword [ebp - 0x94c]
jmp 0x4aee80
push dword [edi + 8]
push dword [edi + 4]
call sub.nss3.dll_BTOA_DataToAscii
push str._____END_CERTIFICATE_____
mov esi, eax
push esi
push str._____BEGIN_CERTIFICATE_____
push str._s_n_s_n_s_n
push ebx
call dword [sym.imp.libnspr4.dll_PR_fprintf]
push esi
call sub.nss3.dll_PORT_Free
mov edi, dword [edi]
add esp, 0x20
test edi, edi
jne 0x4aee80
mov ebx, dword [ebp - 0x948]
push dword [ebp - 0x94c]
call dword [sym.imp.libnspr4.dll_PR_Close]
push ebx
call fcn.004aebe0
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.004b5580
mov esp, ebp
pop ebp
ret