Function at 0x4af440
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x950
mov eax, dword [0x517930]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x94c], eax
lea esi, [ebp - 0x404]
mov dword [ebp - 0x948], 0
push edi
mov dword [ebp - 0x950], ebx
sub esi, ecx
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x4af480
lea edi, [ebp - 0x404]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x4af494
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 0x4af4b0
lea edi, [ebp - 0x404]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4af4c0
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 0x4af4e0
mov al, byte [ebp + ecx - 0x404]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x805], al
test al, al
jne 0x4af4e0
lea ecx, [ebp - 0x404]
dec ecx
lea esp, [esp]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4af500
mov ax, word [0x4d27fc]
mov word [ecx], ax
mov al, byte [0x4d27fe]
mov byte [ecx + 2], al
cmp dword [0x522124], ebx
jne 0x4af53c
push 1
push 1
push 1
call dword [sym.imp.libnspr4.dll_PR_Init]
add esp, 0xc
mov dword [0x522124], 1
mov esi, dword [ebp + 0x14]
cmp esi, 2
je 0x4af596
mov edi, dword [ebp - 0x94c]
push 0x1b0
push 1
push edi
call dword [sym.imp.libnspr4.dll_PR_Open]
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4af596
push str.cant_open_file_n
call fcn.004b6bad
add eax, 0x40
push eax
call fcn.004b97ec
push edi
push str.InstallCAToApplication:_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
lea eax, [ebp - 0x944]
push eax
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4af5fb
cmp esi, 2
je 0x4af5c0
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.InstallCAToApplication:_cant_find_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
test byte [ebp - 0x944], 0x10
je 0x4af628
push dword [ebp - 0x94c]
lea eax, [ebp - 0x918]
push esi
push eax
lea eax, [ebp - 0x804]
push eax
push ebx
call fcn.004aef50
add esp, 0x14
mov dword [ebp - 0x948], eax
lea eax, [ebp - 0x944]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x4af69c
lea ebx, [ebx]
test byte [ebp - 0x944], 0x10
je 0x4af68a
cmp esi, 2
je 0x4af65c
push 0
push 0
push ebx
call dword [sym.imp.libnspr4.dll_PR_Seek]
add esp, 0xc
push dword [ebp - 0x94c]
lea eax, [ebp - 0x918]
push esi
push eax
lea eax, [ebp - 0x804]
push eax
push ebx
call fcn.004aef50
add esp, 0x14
mov dword [ebp - 0x950], 1
or dword [ebp - 0x948], eax
lea eax, [ebp - 0x944]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4af640
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp esi, 2
je 0x4af6b2
push ebx
call dword [sym.imp.libnspr4.dll_PR_Close]
add esp, 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
cmp dword [ebp - 0x950], 0
pop edi
cmovne eax, dword [ebp - 0x948]
xor ecx, ebp
pop esi
pop ebx
call fcn.004b5580
mov esp, ebp
pop ebp
ret