Function at 0x536663
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x575c4b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0x1610
call fcn.0054c740
push edi
lea ecx, [ebp - 0x15a0]
call fcn.00401420
mov dword [ebp - 4], 0
mov dword [ebp - 0x15a4], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
mov ecx, 0x10
xor eax, eax
lea edi, [ebp - 0x15e8]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x10], 0
jmp 0x5366d1
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x10
jge 0x536761
mov ecx, dword [ebp - 0x10]
shl ecx, 4
mov edx, dword [ebp + 8]
xor eax, eax
mov al, byte [edx + ecx + 0x30]
cmp eax, 0xff
je 0x53675c
mov dword [ebp - 0x18], 0
jmp 0x536703
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x18], ecx
cmp dword [ebp - 0x18], 4
jge 0x53675a
mov ecx, 0x10
xor eax, eax
lea edi, [ebp - 0x458]
rep stosd dword es:[edi], eax
mov edx, dword [ebp - 0x10]
shl edx, 4
mov eax, dword [ebp - 0x18]
lea ecx, [edx + eax + 0x30]
mov edx, dword [ebp + 8]
xor eax, eax
mov al, byte [edx + ecx]
push eax
push str._.2X
lea ecx, [ebp - 0x458]
push ecx
call fcn.0054c6e3
add esp, 0xc
lea edx, [ebp - 0x458]
push edx
lea eax, [ebp - 0x15e8]
push eax
call fcn.0054bea0
add esp, 8
jmp 0x5366fa
jmp 0x536761
jmp 0x5366c8
lea ecx, [ebp - 0x418]
push ecx
call fcn.005364d8
add esp, 4
push 2
push 0x5cc7e0
lea edx, [ebp - 0x15e8]
push edx
call fcn.0054e060
add esp, 0xc
test eax, eax
jne 0x5367a3
push str.Samsung
lea eax, [ebp - 0x418]
push eax
call fcn.0054bea0
add esp, 8
jmp 0x53694a
push 2
push 0x5cc7f0
lea ecx, [ebp - 0x15e8]
push ecx
call fcn.0054e060
add esp, 0xc
test eax, eax
jne 0x5367d6
push str.Hynix
lea edx, [ebp - 0x418]
push edx
call fcn.0054bea0
add esp, 8
jmp 0x53694a
push 2
push 0x5cc7fc
lea eax, [ebp - 0x15e8]
push eax
call fcn.0054e060
add esp, 0xc
test eax, eax
jne 0x536809
push str.Micron
lea ecx, [ebp - 0x418]
push ecx
call fcn.0054bea0
add esp, 8
jmp 0x53694a
push 2
push 0x5cc808
lea edx, [ebp - 0x15e8]
push edx
call fcn.0054e060
add esp, 0xc
test eax, eax
jne 0x53683c
push str.Intel
lea eax, [ebp - 0x418]
push eax
call fcn.0054bea0
add esp, 8
jmp 0x53694a
push 2
push 0x5cc814
lea ecx, [ebp - 0x15e8]
push ecx
call fcn.0054e060
add esp, 0xc
test eax, eax
jne 0x53686f
push 0x5cc818
lea edx, [ebp - 0x418]
push edx
call fcn.0054bea0
add esp, 8
jmp 0x53694a
push 2
push 0x5cc81c
lea eax, [ebp - 0x15e8]
push eax
call fcn.0054e060
add esp, 0xc
test eax, eax
jne 0x5368a2
push str.Toshiba
lea ecx, [ebp - 0x418]
push ecx
call fcn.0054bea0
add esp, 8
jmp 0x53694a
push 2
push 0x5cc82c
lea edx, [ebp - 0x15e8]
push edx
call fcn.0054e060
add esp, 0xc
test eax, eax
je 0x5368d6
push 2
push 0x5cc830
lea eax, [ebp - 0x15e8]
push eax
call fcn.0054e060
add esp, 0xc
test eax, eax
jne 0x5368ec
push str.Infineon
lea ecx, [ebp - 0x418]
push ecx
call fcn.0054bea0
add esp, 8
jmp 0x53694a
push 2
push 0x5cc840
lea edx, [ebp - 0x15e8]
push edx
call fcn.0054e060
add esp, 0xc
test eax, eax
jne 0x53691c
push str.SPANSION
lea eax, [ebp - 0x418]
push eax
call fcn.0054bea0
add esp, 8
jmp 0x53694a
push 2
push 0x5cc850
lea ecx, [ebp - 0x15e8]
push ecx
call fcn.0054e060
add esp, 0xc
test eax, eax
jne 0x53694a
push str.SanDisk
lea edx, [ebp - 0x418]
push edx
call fcn.0054bea0
add esp, 8
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x536983
mov dword [ebp - 0x15ec], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15a0]
call fcn.0056206c
mov eax, dword [ebp - 0x15ec]
jmp 0x536c75
lea ecx, [ebp - 0x418]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea edx, [ebp - 0x598]
push edx
push 0x5cc860
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x15a8], eax
cmp dword [ebp - 0x15a8], 0xffffffff
jne 0x5369d8
mov dword [ebp - 0x15f0], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15a0]
call fcn.0056206c
mov eax, dword [ebp - 0x15f0]
jmp 0x536c75
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x15a4], 0
cmp dword [ebp - 0x14], 0
jne 0x536b42
lea eax, [ebp - 0x56c]
push eax
lea ecx, [ebp - 0x15a0]
call fcn.005621f5
lea ecx, [ebp - 0x15a0]
call fcn.0056256e
push str..BIN
push 4
lea ecx, [ebp - 0x15f8]
push ecx
lea ecx, [ebp - 0x15a0]
call fcn.0055f38b
mov dword [ebp - 0x1610], eax
mov edx, dword [ebp - 0x1610]
mov dword [ebp - 0x1614], edx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1614]
push eax
call fcn.00402840
mov byte [ebp - 0x15f4], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x15f8]
call fcn.0056206c
mov ecx, dword [ebp - 0x15f4]
and ecx, 0xff
test ecx, ecx
je 0x536b13
lea edi, [ebp - 0x15e8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
push ecx
lea edi, [ebp - 0x15e8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
push ecx
lea edx, [ebp - 0x1600]
push edx
lea ecx, [ebp - 0x15a0]
call fcn.0055f407
mov dword [ebp - 0x1618], eax
mov eax, dword [ebp - 0x1618]
mov dword [ebp - 0x161c], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x161c]
call fcn.005287a0
push eax
lea ecx, [ebp - 0x15e8]
push ecx
call fcn.0054e060
add esp, 0xc
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0x15fc], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1600]
call fcn.0056206c
mov edx, dword [ebp - 0x15fc]
and edx, 0xff
test edx, edx
je 0x536b13
mov dword [ebp - 0x15a4], 1
jmp 0x536b42
lea eax, [ebp - 0x598]
push eax
mov ecx, dword [ebp - 0x15a8]
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x536b3d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x536b3d
mov dword [ebp - 0x14], 1
jmp 0x5369e9
mov edx, dword [ebp - 0x15a8]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x15a4], 0
jne 0x536b9a
lea eax, [ebp - 0x15e8]
push eax
push str.Can_not_find_original_bin_file____s.bin
lea ecx, [ebp - 0x15a0]
push ecx
call fcn.0055f827
add esp, 0xc
mov dword [ebp - 0x1604], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15a0]
call fcn.0056206c
mov eax, dword [ebp - 0x1604]
jmp 0x536c75
push 0x5cc898
lea edx, [ebp - 0x418]
push edx
call fcn.0054bea0
add esp, 8
lea ecx, [ebp - 0x15a0]
call fcn.005287a0
push eax
lea eax, [ebp - 0x418]
push eax
call fcn.0054bea0
add esp, 8
push 0x5cc89c
lea ecx, [ebp - 0x418]
push ecx
call fcn.0054cc9f
add esp, 8
mov dword [ebp - 0x159c], eax
cmp dword [ebp - 0x159c], 0
jne 0x536c10
mov dword [ebp - 0x1608], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15a0]
call fcn.0056206c
mov eax, dword [ebp - 0x1608]
jmp 0x536c75
mov ecx, 0x400
xor eax, eax
lea edi, [ebp - 0x1598]
rep stosd dword es:[edi], eax
mov edx, dword [ebp - 0x159c]
push edx
push 1
push 0x1000
lea eax, [ebp - 0x1598]
push eax
call fcn.0054ce1b
add esp, 0x10
mov ecx, dword [ebp - 0x159c]
push ecx
call fcn.0054cbf2
add esp, 4
mov edx, dword [ebp - 0x1578]
and edx, 0xff
mov dword [ebp - 0x160c], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15a0]
call fcn.0056206c
mov eax, dword [ebp - 0x160c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
mov esp, ebp
pop ebp
ret