Function at 0x40e680
Capabilities:
Enumerate files on windows
Set current directory

Disassembly:
sub esp, 0x39c
mov ecx, dword [0x82f300]
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x40]
push 0x100
push eax
push ecx
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x40]
push edx
call ebp
mov esi, eax
test esi, esi
jbe 0x40e6c7
mov al, 0x5c
cmp byte [esp + esi + 0x40], al
je 0x40e6c7
dec esi
jne 0x40e6be
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x40]
lea ecx, [esp + 0x140]
push eax
push ecx
mov byte [esp + esi + 0x49], 0
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x140]
push str.Plugins_
push edx
call edi
lea eax, [esp + 0x40]
push str.Plugins.hro
push eax
call edi
lea ecx, [esp + 0x26c]
lea edx, [esp + 0x40]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x40e72b
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x39c
ret
mov byte [esp + esi + 0x49], 0
mov esi, dword [esp + 0x3b4]
push esi
call ebp
test eax, eax
jbe 0x40e747
cmp byte [eax + esi], 0x2e
je 0x40e747
dec eax
jne 0x40e73e
lea eax, [eax + esi + 1]
lea ecx, [esp + 0x34]
push eax
push ecx
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea edx, [esp + 0x34]
push 0x426e5c
push edx
call esi
test eax, eax
jne 0x40e775
lea eax, [esp + 0x34]
push 0x426e58
push eax
call ebx
lea ecx, [esp + 0x34]
push str.jpeg
push ecx
call esi
test eax, eax
jne 0x40e791
lea edx, [esp + 0x34]
push 0x426e4c
push edx
call ebx
lea eax, [esp + 0x40]
lea ecx, [esp + 0x140]
push eax
push ecx
call ebx
lea edx, [esp + 0x298]
lea eax, [esp + 0x140]
push edx
push eax
call edi
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea ecx, [esp + 0x140]
push ecx
call edi
mov ebp, eax
test ebp, ebp
je 0x40e857
jmp 0x40e7d4
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x40e7ee
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebp
call esi
xor ebp, ebp
jmp 0x40e802
call eax
lea edx, [esp + 0x34]
push eax
push edx
call esi
test eax, eax
je 0x40e857
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebp
call esi
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x26c]
push eax
push ecx
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x40e85d
lea edx, [esp + 0x40]
lea eax, [esp + 0x140]
push edx
push eax
call ebx
lea ecx, [esp + 0x298]
lea edx, [esp + 0x140]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [esp + 0x140]
push eax
call edi
mov ebp, eax
test ebp, ebp
jne 0x40e7ce
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
test ebp, ebp
jne 0x40e879
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x39c
ret
push 2
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
jne 0x40e898
push ebp
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x39c
ret
lea edx, [esp + 0x40]
push 0x9548a0
push edx
call ebx
mov eax, dword [0x9549a0]
lea ecx, [esp + 0x40]
push ecx
mov byte [esp + eax + 0x44], 0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [esp + 0x3b4]
lea edx, [esp + 0x18]
push edx
push eax
call edi
test eax, eax
je 0x40e8dc
push ebp
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x39c
ret
push 3
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
jne 0x40e8fb
push ebp
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x39c
ret
mov eax, dword [esp + 0x26]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
and eax, 0xffff
lea ecx, [eax + eax*2]
push ecx
push 0x40
call edi
mov edx, dword [esp + 0x22]
mov dword [esp + 0x2c], eax
push edx
push 0x40
call edi
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x30], eax
cmp cx, 8
lea esi, [esp + 0x240]
ja 0x40e949
mov eax, 1
shl eax, cl
lea ecx, [eax*4 + 0x2c]
push ecx
push 0x40
call edi
mov esi, eax
mov eax, dword [esp + 0x3b4]
lea edx, [esp + 0x18]
push edx
push eax
call ebx
mov ecx, 0xa
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov dword [esi], 0x28
mov ecx, dword [esp + 0x1c]
and ecx, 0xffff
mov dword [esi + 4], ecx
mov edx, dword [esp + 0x1e]
and edx, 0xffff
mov word [esi + 0xc], 1
mov dword [esi + 8], edx
xor edx, edx
mov dword [esi + 0x10], edx
mov ax, word [esp + 0x20]
mov word [esi + 0xe], ax
mov ecx, dword [esp + 0x22]
mov dword [esi + 0x14], ecx
cmp word [esp + 0x20], 8
ja 0x40e9f2
mov cl, byte [esi + 0xe]
mov eax, 1
shl eax, cl
xor edi, edi
test eax, eax
jbe 0x40e9f2
lea eax, [esi + 0x29]
mov ecx, dword [esp + 0x2c]
mov ebx, 1
inc edi
add eax, 4
mov cl, byte [edx + ecx]
add edx, 3
mov byte [eax - 3], cl
mov ecx, dword [esp + 0x2c]
mov cl, byte [edx + ecx - 2]
mov byte [eax - 4], cl
mov ecx, dword [esp + 0x2c]
mov cl, byte [edx + ecx - 1]
mov byte [eax - 5], cl
mov byte [eax - 2], 0
mov cl, byte [esi + 0xe]
shl ebx, cl
cmp edi, ebx
jb 0x40e9b9
push 0
call dword [sym.imp.USER32.dll_GetDC]
push esi
mov edi, eax
call fcn.0040ea90
add esp, 4
mov dword [0x82f060], eax
test eax, eax
je 0x40ea1c
push 0
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectPalette]
mov ebx, eax
jmp 0x40ea20
mov ebx, dword [esp + 0x10]
push edi
call dword [sym.imp.GDI32.dll_RealizePalette]
mov edx, dword [esp + 0x30]
push 0
push esi
push edx
push 4
push esi
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
test ebx, ebx
mov dword [esp + 0x10], eax
je 0x40ea4b
push 0
push ebx
push edi
call dword [sym.imp.GDI32.dll_SelectPalette]
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [esp + 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push eax
call edi
mov ecx, dword [esp + 0x30]
push ecx
call edi
cmp word [esp + 0x20], 8
ja 0x40ea73
push esi
call edi
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x39c
ret