Function at 0x412330
Capabilities:
Check if file exists
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46fa2d
mov eax, dword fs:[0]
push eax
sub esp, 0x4e0
mov eax, dword [0x4a5010]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x4e0], ecx
mov dword [ebp - 4], 0
xorps xmm0, xmm0
mov ecx, dword [ebp + 0xc]
xor ebx, ebx
mov esi, dword [ebp + 8]
xor edi, edi
sub ecx, esi
movq qword [ebp - 0x244], xmm0
sar ecx, 2
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x228], ecx
mov dword [ebp - 0x244], edi
mov dword [ebp - 0x240], ebx
mov dword [ebp - 0x23c], ebx
mov byte [ebp - 4], 1
cmp esi, dword [ebp + 0xc]
je 0x4123fb
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push 0
push dword [esi]
call dword [sym.imp.FreeImage.dll__FreeImage_GetFileTypeU_8]
push dword [esi]
mov edi, eax
call dword [sym.imp.FreeImage.dll__FreeImage_GetFIFFromFilenameU_4]
cmp edi, 0xffffffff
jne 0x4123d3
cmp eax, edi
je 0x4123e7
push dword [esi]
call ebx
test eax, eax
je 0x4123e7
push esi
lea ecx, [ebp - 0x244]
call fcn.0041abb0
add esi, 4
cmp esi, dword [ebp + 0xc]
jne 0x4123b6
mov ebx, dword [ebp - 0x240]
mov edi, dword [ebp - 0x244]
mov eax, ebx
sub eax, edi
sar eax, 2
test eax, eax
jne 0x41240d
xor edi, edi
jmp 0x412cf0
mov eax, dword [edi]
cmp dword [eax - 4], 1
jle 0x41241f
push dword [eax - 0xc]
mov ecx, edi
call fcn.004024e0
mov eax, dword [edi]
xorps xmm0, xmm0
movq qword [ebp - 0x238], xmm0
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x4c4], eax
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 0
mov byte [ebp - 4], 2
cmp dword [ebp - 0x228], 1
mov dword [ebp - 0x4e4], 0
jbe 0x41255c
cmp edi, ebx
je 0x412a37
nop dword [eax]
mov ecx, dword [edi]
sub ecx, 0x10
call fcn.00401e20
lea esi, [eax + 0x10]
mov dword [ebp - 0x228], esi
mov byte [ebp - 4], 3
cmp dword [esi - 4], 1
jle 0x4124b1
push dword [esi - 0xc]
lea ecx, [ebp - 0x228]
call fcn.004024e0
mov esi, dword [ebp - 0x228]
xor eax, eax
mov dword [ebp - 0x4c8], 7
mov dword [ebp - 0x4cc], 0
mov word [ebp - 0x4dc], ax
cmp word [esi], ax
jne 0x4124d7
xor ecx, ecx
jmp 0x4124ef
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4124e0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x4dc]
call fcn.004215d0
lea eax, [ebp - 0x4dc]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x238]
call fcn.0041aa90
mov eax, dword [ebp - 0x4c8]
cmp eax, 8
jb 0x412530
inc eax
lea ecx, [ebp - 0x4dc]
push eax
push dword [ebp - 0x4dc]
call fcn.004085b0
mov byte [ebp - 4], 2
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x41254c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 4
cmp edi, ebx
jne 0x412480
jmp 0x412a37
push 0x208
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.00458500
add esp, 0xc
lea eax, [ebp - 0x21c]
push dword [ebp - 0x4c4]
push 0x104
push eax
call fcn.00459bde
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
call fcn.004035d0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x220], esi
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 5
test eax, 0xffff0000
jne 0x4125dc
movzx edi, ax
mov ecx, edi
call fcn.004031b0
test eax, eax
je 0x41260d
push edi
push eax
lea ecx, [ebp - 0x220]
call fcn.00402300
jmp 0x412607
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4125e5
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x220]
call fcn.00402560
mov esi, dword [ebp - 0x220]
mov byte [ebp - 4], 6
call fcn.004035d0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x228], eax
mov byte [ebp - 4], 7
call fcn.004035d0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x22c], ebx
mov byte [ebp - 4], 8
mov ecx, dword [esi - 0xc]
mov dword [ebp - 0x224], ecx
lea eax, [ecx - 1]
test eax, eax
js 0x412665
cmp eax, ecx
jg 0x412665
cmp word [esi + eax*2], 0x5c
je 0x4126af
lea edi, [ecx + 1]
test edi, edi
jns 0x41266f
push 0x80070057
call fcn.00403340
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x412692
push edi
lea ecx, [ebp - 0x220]
call fcn.004023a0
mov esi, dword [ebp - 0x220]
mov eax, dword [ebp - 0x224]
mov ecx, 0x5c
mov word [esi + eax*2], cx
cmp edi, dword [esi - 8]
jg 0x412665
xor eax, eax
mov dword [esi - 0xc], edi
mov word [esi + edi*2], ax
push 0x48c9f0
lea edx, [ebp - 0x220]
lea ecx, [ebp - 0x224]
call fcn.0041af20
add esp, 4
push eax
lea ecx, [ebp - 0x228]
mov byte [ebp - 4], 9
call fcn.0041bc30
mov byte [ebp - 4], 8
or eax, 0xffffffff
mov edx, dword [ebp - 0x224]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4126fa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.004035d0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x224], edi
lea eax, [ebp - 0x4bc]
mov byte [ebp - 4], 0xa
push eax
push dword [ebp - 0x228]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
push dword [ebp - 0x4c4]
mov dword [ebp - 0x4c0], eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
cmp dword [ebp - 0x4c0], 0xffffffff
mov dword [ebp - 0x4ec], eax
je 0x4129c1
mov esi, dword [ebp - 0x4c0]
test byte [ebp - 0x4bc], 0x10
jne 0x41299e
lea eax, [ebp - 0x490]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
mov edx, eax
test edx, edx
jne 0x412775
xor ecx, ecx
jmp 0x41278f
mov ecx, edx
lea esi, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412780
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x224]
call fcn.00402560
mov edi, dword [ebp - 0x224]
mov esi, dword [edi - 0xc]
test esi, esi
jle 0x412998
js 0x412665
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, esi
or eax, ecx
jge 0x4127d6
push esi
lea ecx, [ebp - 0x224]
call fcn.004023a0
mov edi, dword [ebp - 0x224]
lea eax, [esi + 1]
push eax
push edi
call fcn.00459808
add esp, 8
cmp esi, dword [edi - 8]
jg 0x412665
mov dword [edi - 0xc], esi
xor eax, eax
mov word [edi + esi*2], ax
mov eax, dword [ebp - 0x4e0]
push ecx
lea ecx, [ebp - 0x224]
push ecx
mov esi, dword [eax + 0x3ec]
mov edx, esi
mov ecx, dword [eax + 0x3e8]
call fcn.0041ef80
add esp, 8
cmp eax, esi
je 0x412850
mov eax, dword [eax]
mov ecx, edi
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x412847
test dx, dx
je 0x412843
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x412847
add ecx, 4
add eax, 4
test dx, dx
jne 0x412821
xor eax, eax
jmp 0x41284c
sbb eax, eax
or eax, 1
test eax, eax
jns 0x41286d
lea eax, [ebp - 0x490]
push eax
push dword [ebp - 0x4ec]
call fcn.00459c42
add esp, 8
test eax, eax
jne 0x412998
lea eax, [ebp - 0x490]
push eax
lea edx, [ebp - 0x220]
lea ecx, [ebp - 0x4e8]
call fcn.0041af20
add esp, 4
push eax
lea ecx, [ebp - 0x22c]
mov byte [ebp - 4], 0xb
call fcn.0041bc30
mov byte [ebp - 4], 0xa
or eax, 0xffffffff
mov edx, dword [ebp - 0x4e8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4128ba
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x22c]
cmp dword [ebx - 4], 1
jle 0x4128da
push dword [ebx - 0xc]
lea ecx, [ebp - 0x22c]
call fcn.004024e0
mov ebx, dword [ebp - 0x22c]
xor eax, eax
mov dword [ebp - 0x4c8], 7
mov dword [ebp - 0x4cc], 0
mov word [ebp - 0x4dc], ax
cmp word [ebx], ax
jne 0x412900
xor ecx, ecx
jmp 0x412914
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412905
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x4dc]
call fcn.004215d0
lea eax, [ebp - 0x4dc]
mov byte [ebp - 4], 0xc
push eax
lea ecx, [ebp - 0x238]
call fcn.0041aa90
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x4c8]
cmp eax, 8
jb 0x412959
inc eax
lea ecx, [ebp - 0x4dc]
push eax
push dword [ebp - 0x4dc]
call fcn.004085b0
push dword [ebp - 0x4c4]
push ebx
call fcn.00459c42
mov esi, dword [ebp - 0x4c0]
add esp, 8
test eax, eax
jne 0x41299e
mov ecx, dword [ebp - 0x234]
mov eax, 0x2aaaaaab
sub ecx, dword [ebp - 0x238]
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
dec eax
add eax, edx
mov dword [ebp - 0x4e4], eax
jmp 0x41299e
mov esi, dword [ebp - 0x4c0]
lea eax, [ebp - 0x4bc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x412751
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [ebp - 0x220]
mov byte [ebp - 4], 8
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4129dd
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
or edi, 0xffffffff
mov byte [ebp - 4], 7
add ebx, 0xfffffff0
mov eax, edi
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x4129fb
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 6
mov eax, edi
mov edx, dword [ebp - 0x228]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412a1c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x412a37
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x4e0]
lea eax, [ebp - 0x238]
push eax
mov ecx, dword [ebx + 0x494]
call fcn.00406730
push dword [ebp - 0x4e4]
mov ecx, ebx
call fcn.00418800
push dword [ebp - 0x4c4]
push dword [ebx + 0x46c]
call fcn.00459c42
add esp, 8
test eax, eax
jne 0x412b2c
mov esi, dword [ebx + 0x40c]
mov ebx, dword [sym.imp.FreeImage.dll__FreeImage_Unload_4]
cmp dword [esi + 0x1c0], eax
je 0x412a94
push dword [esi + 0x1b0]
call ebx
mov dword [esi + 0x1b0], 0
mov edi, 3
add esi, 0x1b4
nop dword [eax]
mov eax, dword [esi]
test eax, eax
je 0x412abf
push eax
call ebx
mov dword [esi], 0
add esi, 4
sub edi, 1
jne 0x412ab0
mov ebx, dword [ebp - 0x4e0]
mov eax, dword [ebx + 0x46c]
lea edx, [eax - 0x10]
mov esi, dword [edx]
cmp dword [edx + 4], edi
je 0x412b2c
cmp dword [edx + 0xc], edi
lea ecx, [edx + 0xc]
jge 0x412b08
cmp dword [eax - 8], edi
jge 0x412af4
push 0x80070057
call fcn.00403340
mov dword [eax - 0xc], 0
xor ecx, ecx
mov eax, dword [ebx + 0x46c]
mov word [eax], cx
jmp 0x412b2c
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x412b1c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx + 0x46c], eax
mov esi, dword [ebx + 0x40c]
lea ecx, [ebp - 0x268]
push esi
call dword [sym.imp.soui.dll_public:_void___thiscall_SOUI::EventArgs::constructor_class_SOUI::SObjectImpl_struct_SOUI::IObject___]
mov dword [ebp - method.SOUI::SGifPlayer.1.virtual_0], 0x48efe4
mov dword [ebp - 0x260], 0x48efa8
push 0
push ecx
mov byte [ebp - 4], 0xd
mov ecx, esi
mov dword [esi + 0x1ac], 0
call fcn.0042f340
mov dword [ebp - 0x248], eax
lea ecx, [ebp - 0x268]
mov eax, dword [esi]
push ecx
mov ecx, esi
call dword [eax + 0x8c]
lea ecx, [ebp - 0x268]
mov byte [ebp - 4], 2
call dword [sym.imp.soui.dll_public_virtual:_void___thiscall_SOUI::EventArgs::destructor_void_]
push dword [ebx + 0x42c]
push dword [ebx + 0x428]
call fcn.00415ca0
mov ecx, ebx
call fcn.00418650
mov ecx, ebx
call fcn.004154f0
mov ecx, ebx
call fcn.00418210
push 5
xor eax, eax
mov dword [ebp - 0x248], 7
push str.kantu
lea ecx, [ebp - 0x25c]
mov dword [ebp - 0x24c], 0
mov word [ebp - 0x25c], ax
call fcn.004215d0
mov ebx, dword [ebp - 0x4c4]
xor eax, eax
mov byte [ebp - 4], 0xe
mov dword [ebp - 0x4c8], 7
mov dword [ebp - 0x4cc], 0
mov word [ebp - 0x4dc], ax
cmp word [ebx], ax
jne 0x412c17
xor ecx, ecx
jmp 0x412c2f
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412c20
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x4dc]
call fcn.004215d0
lea edx, [ebp - 0x25c]
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x4dc]
call fcn.00438840
mov eax, dword [ebp - 0x4c8]
cmp eax, 8
jb 0x412c6f
inc eax
lea ecx, [ebp - 0x4dc]
push eax
push dword [ebp - 0x4dc]
call fcn.004085b0
xor eax, eax
mov dword [ebp - 0x4c8], 7
mov word [ebp - 0x4dc], ax
mov eax, dword [ebp - 0x248]
mov dword [ebp - 0x4cc], 0
cmp eax, 8
jb 0x412caa
inc eax
lea ecx, [ebp - 0x25c]
push eax
push dword [ebp - 0x25c]
call fcn.004085b0
mov esi, dword [ebp - 0x238]
mov edi, 1
test esi, esi
je 0x412cf0
push dword [ebp - 0x4e8]
mov edx, dword [ebp - 0x234]
push ecx
mov ecx, esi
call fcn.0041e340
mov ecx, dword [ebp - 0x230]
mov eax, 0x2aaaaaab
sub ecx, esi
add esp, 8
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
push esi
call fcn.0041bd50
lea ecx, [ebp - 0x244]
call fcn.00401a30
lea ecx, [ebp + 8]
call fcn.00401a30
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0043f53f
mov esp, ebp
pop ebp
ret 0xc