Function at 0x496658
Capabilities:
Enumerate files on windows
Link many functions at runtime

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffff004
mov ebp, str..dll
push eax
add esp, 0xfffffbb0
push 0x4b00
push 0
push 0x4f0ab4
call fcn.004a35a0
xor eax, eax
add esp, 0xc
mov dword [0x4f55b4], eax
xor eax, eax
or ecx, 0xffffffff
mov edi, 0x4d3a70
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea esi, [esp + 0x110c]
xchg edi, esi
mov edx, ecx
mov eax, edi
shr ecx, 2
lea eax, [esp + 0x110c]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.004a36d4
pop ecx
mov edi, eax
test edi, edi
jle 0x4966dd
xor eax, eax
mov al, byte [esp + edi + 0x110b]
cmp eax, 0x5c
je 0x4966dd
mov byte [esp + edi + 0x110c], 0x5c
inc edi
lea edx, [esp + 0x110c]
mov esi, ebp
add edi, edx
push edi
mov eax, edi
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
pop edi
lea edx, [esp + 0x1310]
push edx
lea ecx, [esp + 0x1110]
push ecx
call sub.KERNEL32.DLL_FindFirstFileA
mov dword [esp + 4], eax
cmp dword [esp + 4], 0xffffffff
jne 0x496716
xor eax, eax
jmp 0x496b40
call sub.USER32.DLL_CreateMenu
mov dword [esp + 8], eax
cmp dword [esp + 8], 0
jne 0x49672d
xor eax, eax
jmp 0x496b40
xor esi, esi
push 0
lea eax, [esp + 0x1214]
push eax
push 0
push 0
lea edx, [esp + 0x134c]
push edx
call fcn.004a51bc
add esp, 0x14
lea ecx, [ebp + 6]
push ecx
lea eax, [esp + 0x1214]
push eax
call fcn.004a38bc
add esp, 8
test eax, eax
je 0x496ad3
lea edx, [ebp + 0xc]
push edx
lea ecx, [esp + 0x1214]
push ecx
call fcn.004a38bc
add esp, 8
test eax, eax
je 0x496ad3
xor eax, eax
or ecx, 0xffffffff
mov edi, 0x4d3a70
lea esi, [esp + 0x110c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x110c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call fcn.004a36d4
pop ecx
mov edi, eax
test edi, edi
jle 0x4967d9
xor eax, eax
mov al, byte [esp + edi + 0x110b]
cmp eax, 0x5c
je 0x4967d9
mov byte [esp + edi + 0x110c], 0x5c
inc edi
lea edx, [esp + 0x110c]
xor eax, eax
add edi, edx
or ecx, 0xffffffff
push edi
mov esi, edi
lea edi, [esp + 0x1340]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
lea eax, [esp + 0x110c]
push eax
call sub.KERNEL32.DLL_LoadLibraryA
mov esi, eax
test esi, esi
je 0x496ad3
lea eax, [ebp + 0x14]
push eax
push esi
call sub.KERNEL32.DLL_GetProcAddress
mov ebx, eax
lea eax, [ebp + 0x25]
push eax
push esi
call sub.KERNEL32.DLL_GetProcAddress
mov edi, eax
test ebx, ebx
je 0x496ad3
test edi, edi
je 0x496ad3
mov byte [esp + 0xc], 0
lea eax, [esp + 0xc]
push eax
call ebx
pop ecx
mov ecx, eax
cmp ecx, 0x6a
jl 0x496869
cmp ecx, 0x6e
jg 0x496869
cmp byte [esp + 0xc], 0
jne 0x49689c
mov eax, ecx
mov ebx, 0x64
cdq
idiv ebx
push edx
mov eax, ecx
mov ecx, 0x64
cdq
idiv ecx
push eax
lea eax, [esp + 0x1218]
push eax
lea edx, [ebp + 0x36]
push edx
push 0
push 0
call sym.ollydbg.exe__Addtolist
add esp, 0x18
jmp 0x496ad3
mov ebx, dword [0x4f55b4]
shl ebx, 3
lea ebx, [ebx + ebx*2]
lea ebx, [ebx + ebx*4]
lea ebx, [ebx + ebx*4]
add ebx, 0x4f0ab4
mov dword [ebx], esi
lea eax, [ebx + 4]
push esi
mov esi, eax
push edi
xor eax, eax
lea edi, [esp + 0x1344]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebx + 0x108]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
push 0x1f
lea eax, [esp + 0x10]
push eax
push edx
call fcn.004a3904
add esp, 0xc
lea ecx, [ebp + 0x60]
mov byte [ebx + 0x127], 0
push ecx
push esi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [ebx + 0x238], eax
lea eax, [ebp + 0x73]
push eax
push esi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [ebx + 0x230], eax
lea edx, [ebp + 0x88]
push edx
push esi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [ebx + 0x234], eax
lea ecx, [ebp + 0x99]
push ecx
push esi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [ebx + 0x23c], eax
lea eax, [ebp + 0xae]
push eax
push esi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [ebx + 0x240], eax
lea edx, [ebp + 0xc2]
push edx
push esi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [ebx + 0x244], eax
lea ecx, [ebp + 0xd8]
push ecx
push esi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [ebx + 0x248], eax
lea eax, [ebp + 0xea]
push eax
push esi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [ebx + 0x24c], eax
lea edx, [ebp + 0xf7]
push edx
push esi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [ebx + 0x250], eax
lea ecx, [ebp + 0x106]
push ecx
push esi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [ebx + 0x254], eax
xor eax, eax
mov dword [esp], eax
push esp
mov edx, dword [0x4d3b7c]
push edx
push 0x6e
call edi
add esp, 0xc
mov edi, eax
test edi, edi
je 0x4969f3
push edi
lea ecx, [esp + 0x1214]
push ecx
lea eax, [ebp + 0x116]
push eax
push 0
push 0
call sym.ollydbg.exe__Addtolist
add esp, 0x14
jmp 0x496ad3
mov esi, dword [0x4f55b4]
shl esi, 6
add esi, 0xe000
mov byte [esp + 0xc], 0
cmp dword [ebx + 0x234], 0
je 0x496a2d
push 0
lea eax, [esp + 0x10]
push eax
push 0
call dword [ebx + 0x234]
add esp, 0xc
test eax, eax
je 0x496a2d
cmp byte [esp + 0xc], 0
jne 0x496a31
xor edi, edi
jmp 0x496a38
call sub.USER32.DLL_CreateMenu
mov edi, eax
test edi, edi
je 0x496a52
lea eax, [esp + 0xc]
mov dword [0x4f55bc], eax
push 1
push esi
push ebx
push edi
call fcn.00496260
add esp, 0x10
mov ecx, dword [0x4f55b4]
cmp ecx, 0x7f
jge 0x496a86
add ebx, 0x108
push ebx
mov eax, ecx
inc eax
mov ecx, 0x7f
cdq
idiv ecx
push edx
lea eax, [ebp + 0x141]
push eax
lea edx, [esp + 0x18]
push edx
call fcn.004a6c2c
add esp, 0x10
jmp 0x496aa1
add ebx, 0x108
push ebx
lea eax, [ebp + 0x145]
push eax
lea edx, [esp + 0x14]
push edx
call fcn.004a6c2c
add esp, 0xc
test edi, edi
jne 0x496ab9
lea ecx, [esp + 0xc]
push ecx
push esi
push 0
mov eax, dword [esp + 0x14]
push eax
call sub.USER32.DLL_AppendMenuA
jmp 0x496acb
lea edx, [esp + 0xc]
push edx
push edi
push 0x10
mov ecx, dword [esp + 0x14]
push ecx
call sub.USER32.DLL_AppendMenuA
inc dword [0x4f55b4]
xor esi, esi
test esi, esi
je 0x496add
push esi
call sub.KERNEL32.DLL_FreeLibrary
lea eax, [esp + 0x1310]
push eax
mov edx, dword [esp + 8]
push edx
call sub.KERNEL32.DLL_FindNextFileA
test eax, eax
jne 0x49672d
cmp dword [0x4f55b4], 0
jle 0x496b31
lea ecx, [ebp + 0x148]
push ecx
mov eax, dword [esp + 0xc]
push eax
push 0x410
push 3
mov edx, dword [0x4d3b7c]
push edx
call sub.USER32.DLL_GetMenu
push eax
call sub.USER32.DLL_InsertMenuA
mov ecx, dword [0x4d3b7c]
push ecx
call sub.USER32.DLL_DrawMenuBar
mov eax, dword [esp + 4]
push eax
call sub.KERNEL32.DLL_FindClose
mov eax, dword [0x4f55b4]
add esp, 0x1450
pop ebp
pop edi
pop esi
pop ebx
ret