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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x571680
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x618
mov dword [ebp - 0x5f0], 1
lea ecx, [ebp - 0x5a4]
call fcn.004013e0
mov dword [ebp - 4], 0
mov dword [ebp - 0x5a8], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
push 0x40
push 0
lea eax, [ebp - 0x5ec]
push eax
call fcn.0054bfb0
add esp, 0xc
mov dword [ebp - 0x10], 0
jmp 0x4feab0
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], 0x10
jge 0x4feb45
mov edx, dword [ebp - 0x10]
shl edx, 4
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [eax + edx + 0x30]
cmp ecx, 0xff
je 0x4feb40
mov dword [ebp - 0x18], 0
jmp 0x4feae3
mov edx, dword [ebp - 0x18]
add edx, 1
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x18], 4
jge 0x4feb3e
push 0x40
push 0
lea eax, [ebp - 0x45c]
push eax
call fcn.0054bfb0
add esp, 0xc
mov ecx, dword [ebp - 0x10]
shl ecx, 4
mov edx, dword [ebp - 0x18]
lea eax, [ecx + edx + 0x30]
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx + eax]
push edx
push 0x5b1da4
lea eax, [ebp - 0x45c]
push eax
call fcn.0054c45b
add esp, 0xc
lea ecx, [ebp - 0x45c]
push ecx
lea edx, [ebp - 0x5ec]
push edx
call fcn.0054bed0
add esp, 8
jmp 0x4feada
jmp 0x4feb45
jmp 0x4feaa7
lea eax, [ebp - 0x41c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004fe8d1
add esp, 8
push 2
push 0x5b1dac
lea edx, [ebp - 0x5ec]
push edx
call fcn.0054d620
add esp, 0xc
test eax, eax
jne 0x4feb8b
push 0x5b1db0
lea eax, [ebp - 0x41c]
push eax
call fcn.0054bed0
add esp, 8
jmp 0x4fed32
push 2
push 0x5b1dbc
lea ecx, [ebp - 0x5ec]
push ecx
call fcn.0054d620
add esp, 0xc
test eax, eax
jne 0x4febbe
push str.Hynix
lea edx, [ebp - 0x41c]
push edx
call fcn.0054bed0
add esp, 8
jmp 0x4fed32
push 2
push 0x5b1dc8
lea eax, [ebp - 0x5ec]
push eax
call fcn.0054d620
add esp, 0xc
test eax, eax
jne 0x4febf1
push str.Micron
lea ecx, [ebp - 0x41c]
push ecx
call fcn.0054bed0
add esp, 8
jmp 0x4fed32
push 2
push 0x5b1dd4
lea edx, [ebp - 0x5ec]
push edx
call fcn.0054d620
add esp, 0xc
test eax, eax
jne 0x4fec24
push str.Intel
lea eax, [ebp - 0x41c]
push eax
call fcn.0054bed0
add esp, 8
jmp 0x4fed32
push 2
push 0x5b1de0
lea ecx, [ebp - 0x5ec]
push ecx
call fcn.0054d620
add esp, 0xc
test eax, eax
jne 0x4fec57
push 0x5b1de4
lea edx, [ebp - 0x41c]
push edx
call fcn.0054bed0
add esp, 8
jmp 0x4fed32
push 2
push 0x5b1de8
lea eax, [ebp - 0x5ec]
push eax
call fcn.0054d620
add esp, 0xc
test eax, eax
jne 0x4fec8a
push 0x5b1dec
lea ecx, [ebp - 0x41c]
push ecx
call fcn.0054bed0
add esp, 8
jmp 0x4fed32
push 2
push 0x5b1df8
lea edx, [ebp - 0x5ec]
push edx
call fcn.0054d620
add esp, 0xc
test eax, eax
je 0x4fecbe
push 2
push 0x5b1dfc
lea eax, [ebp - 0x5ec]
push eax
call fcn.0054d620
add esp, 0xc
test eax, eax
jne 0x4fecd4
push str.Infineon
lea ecx, [ebp - 0x41c]
push ecx
call fcn.0054bed0
add esp, 8
jmp 0x4fed32
push 2
push 0x5b1e0c
lea edx, [ebp - 0x5ec]
push edx
call fcn.0054d620
add esp, 0xc
test eax, eax
jne 0x4fed04
push str.SPANSION
lea eax, [ebp - 0x41c]
push eax
call fcn.0054bed0
add esp, 8
jmp 0x4fed32
push 2
push 0x5b1e1c
lea ecx, [ebp - 0x5ec]
push ecx
call fcn.0054d620
add esp, 0xc
test eax, eax
jne 0x4fed32
push 0x5b1e20
lea edx, [ebp - 0x41c]
push edx
call fcn.0054bed0
add esp, 8
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4fed6b
mov dword [ebp - 0x5f4], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5a4]
call fcn.00560ea1
mov eax, dword [ebp - 0x5f4]
jmp 0x4ff070
lea ecx, [ebp - 0x41c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea edx, [ebp - 0x59c]
push edx
push 0x5b1e2c
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x5ac], eax
cmp dword [ebp - 0x5ac], 0xffffffff
jne 0x4fedc0
mov dword [ebp - 0x5f8], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5a4]
call fcn.00560ea1
mov eax, dword [ebp - 0x5f8]
jmp 0x4ff070
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x5a8], 0
cmp dword [ebp - 0x14], 0
jne 0x4fef24
lea eax, [ebp - 0x570]
push eax
lea ecx, [ebp - 0x5a4]
call fcn.0056102a
lea ecx, [ebp - 0x5a4]
call fcn.005613a3
push str..BIN
push 4
lea ecx, [ebp - 0x600]
push ecx
lea ecx, [ebp - 0x5a4]
call fcn.0055e5db
mov dword [ebp - 0x618], eax
mov edx, dword [ebp - 0x618]
mov dword [ebp - 0x61c], edx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x61c]
push eax
call fcn.004089c0
mov byte [ebp - 0x5fc], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x600]
call fcn.00560ea1
mov ecx, dword [ebp - 0x5fc]
and ecx, 0xff
test ecx, ecx
je 0x4feef5
lea edx, [ebp - 0x5ec]
push edx
call fcn.0054c3e0
add esp, 4
push eax
lea eax, [ebp - 0x5ec]
push eax
call fcn.0054c3e0
add esp, 4
push eax
lea ecx, [ebp - 0x608]
push ecx
lea ecx, [ebp - 0x5a4]
call fcn.0055e657
mov dword [ebp - 0x620], eax
mov edx, dword [ebp - 0x620]
mov dword [ebp - 0x624], edx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x624]
call fcn.00401440
push eax
lea eax, [ebp - 0x5ec]
push eax
call fcn.0054d620
add esp, 0xc
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0x604], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x608]
call fcn.00560ea1
mov ecx, dword [ebp - 0x604]
and ecx, 0xff
test ecx, ecx
je 0x4feef5
mov dword [ebp - 0x5a8], 1
jmp 0x4fef24
lea edx, [ebp - 0x59c]
push edx
mov eax, dword [ebp - 0x5ac]
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4fef1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x4fef1f
mov dword [ebp - 0x14], 1
jmp 0x4fedd1
mov ecx, dword [ebp - 0x5ac]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x5a8], 0
jne 0x4fef7c
lea edx, [ebp - 0x5ec]
push edx
push str.Can_not_find_original_bin_file____s.bin
lea eax, [ebp - 0x5a4]
push eax
call fcn.0055ea77
add esp, 0xc
mov dword [ebp - 0x60c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5a4]
call fcn.00560ea1
mov eax, dword [ebp - 0x60c]
jmp 0x4ff070
push 0x5b1e64
lea ecx, [ebp - 0x41c]
push ecx
call fcn.0054bed0
add esp, 8
lea ecx, [ebp - 0x5a4]
call fcn.00401440
push eax
lea edx, [ebp - 0x41c]
push edx
call fcn.0054bed0
add esp, 8
mov dword [ebp - 0x1c], 0
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x41c]
push ecx
call fcn.0053543c
add esp, 8
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
mov eax, dword [ebp - 0x1c]
shl eax, 0x20
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
add edx, eax
mov eax, dword [ebp + 0x14]
mov dword [eax], edx
push 0x5b1e68
lea ecx, [ebp - 0x41c]
push ecx
call fcn.0054d3be
add esp, 8
mov dword [ebp - 0x5a0], eax
cmp dword [ebp - 0x5a0], 0
jne 0x4ff023
mov dword [ebp - 0x610], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5a4]
call fcn.00560ea1
mov eax, dword [ebp - 0x610]
jmp 0x4ff070
mov edx, dword [ebp - 0x5a0]
push edx
push 1
push 0x1000
mov eax, dword [ebp + 0x10]
push eax
call fcn.0054d276
add esp, 0x10
mov ecx, dword [ebp - 0x5a0]
push ecx
call fcn.0054d1f9
add esp, 4
mov edx, dword [ebp - 0x5f0]
mov dword [ebp - 0x614], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5a4]
call fcn.00560ea1
mov eax, dword [ebp - 0x614]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret