Function at 0x403eb0
Capabilities:
Copy file
Enumerate files on windows
Extract resource via kernel32 functions
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40cfdb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1b44
call fcn.00406910
push ebx
mov bx, word [ebp + 8]
push esi
movzx eax, bx
push edi
push eax
lea ecx, [esp + 0xb4]
push str.._c:
push ecx
call fcn.0040660a
add esp, 0xc
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
lea edx, [esp + 0xc8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x14], edi
jne 0x403f4c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0xb4]
push eax
call fcn.00401120
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0x1b54]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x58]
call fcn.00401770
push edi
lea ecx, [esp + 0x5c]
mov dword [esp + 0x1b60], 0
call fcn.004021f0
mov esi, dword [ebp + 0xc]
mov eax, dword [esi + 4]
test eax, eax
jne 0x404021
push 0x600
lea ecx, [esp + 0xae4]
push ecx
push 1
push 0
lea ecx, [esp + 0x68]
call fcn.00401d40
test eax, eax
je 0x4042a7
mov edx, dword [str.FAT32]
mov eax, dword [esi + 0x1c]
push edx
push eax
call fcn.00406b5e
add esp, 8
test eax, eax
jne 0x403fc9
cmp bx, 0x43
setb cl
dec cl
and ecx, 0x80
mov byte [esp + 0xb20], cl
jmp 0x403fdf
cmp bx, 0x43
setb dl
dec dl
and edx, 0x80
mov byte [esp + 0xb04], dl
push 0x600
lea eax, [esp + 0xae4]
push eax
push 1
push 0
lea ecx, [esp + 0x68]
call fcn.00401de0
test eax, eax
je 0x4042a7
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x58]
mov dword [esp + 0x1b5c], 0xffffffff
call fcn.00401e80
jmp 0x404608
mov ecx, dword [0x412278]
mov edx, dword [esi + 0x1c]
push ecx
push edx
call fcn.00406b5e
add esp, 8
test eax, eax
jne 0x4041bd
push 0x600
lea eax, [esp + 0xae4]
push eax
push 1
push 0
lea ecx, [esp + 0x68]
call fcn.00401d40
test eax, eax
je 0x4042a7
mov eax, dword [esi + 0xc]
cmp eax, 1
jne 0x404072
push 0xa
push str.OMD16PBR
jmp 0x404152
cmp eax, 2
je 0x40414b
cmp eax, 3
je 0x40414b
push 5
lea ecx, [esp + 0xb1a]
push str.FAT12
push ecx
call fcn.00406b02
add esp, 0xc
test eax, eax
push 0xa
jne 0x4040a8
push str.FD12PBR
jmp 0x4040ad
push str.FD16PBR
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
lea edi, [esp + 0xd0]
mov ecx, 0x80
rep movsd dword es:[edi], dword [esi]
lea esi, [esp + 0xaeb]
lea edi, [esp + 0xdb]
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
movzx ecx, word [esp + 0xdb]
movzx edx, word [esp + 0xe1]
shr ecx, 5
lea eax, [edx + ecx - 1]
xor edx, edx
div ecx
movzx ecx, word [esp + 0xde]
mov edx, dword [esp + 0xec]
lea esi, [ecx + edx]
mov dword [esp + 0x112], esi
movzx esi, word [esp + 0xe6]
lea ecx, [ecx + esi*2]
add ecx, edx
mov dword [esp + 0x116], ecx
movzx edx, ax
add edx, ecx
mov word [esp + 0x110], ax
mov dword [esp + 0x11a], edx
jmp 0x404192
push 0xa
push str.MD16PBR
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
lea edi, [esp + 0xd0]
mov ecx, 0x80
rep movsd dword es:[edi], dword [esi]
lea esi, [esp + 0xaeb]
lea edi, [esp + 0xdb]
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
cmp bx, 0x43
setb al
dec al
push 0x600
lea ecx, [esp + 0xd4]
push ecx
push 1
push 0
and eax, 0x80
mov byte [esp + 0x104], al
jmp 0x40429a
mov edx, dword [str.FAT32]
mov eax, dword [esi + 0x1c]
push edx
push eax
call fcn.00406b5e
add esp, 8
test eax, eax
jne 0x4042d9
push 0x600
lea ecx, [esp + 0xae4]
push ecx
push 3
push eax
lea ecx, [esp + 0x68]
call fcn.00401d40
test eax, eax
je 0x4042a7
push 0xa
push str.MD32PBR
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
mov ecx, 0x180
lea edi, [esp + 0xd0]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x13
lea esi, [esp + 0xaeb]
lea edi, [esp + 0xdb]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
cmp bx, 0x43
setb dl
dec dl
push 0x600
movsb byte es:[edi], byte [esi]
lea eax, [esp + 0xd4]
push eax
mov ecx, 0x80
lea esi, [esp + 0xce8]
lea edi, [esp + 0x2d8]
rep movsd dword es:[edi], dword [esi]
push 3
and edx, 0x80
push 0
lea ecx, [esp + 0x68]
mov byte [esp + 0x120], dl
call fcn.00401de0
test eax, eax
je 0x4042a7
push 0x600
lea ecx, [esp + 0xd4]
push ecx
push 3
push 6
lea ecx, [esp + 0x68]
call fcn.00401de0
test eax, eax
jne 0x4042d2
lea ecx, [esp + 0x58]
mov dword [esp + 0x1b5c], 0xffffffff
call fcn.00401e80
xor eax, eax
mov ecx, dword [esp + 0x1b54]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0xc]
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x58]
mov dword [esp + 0x1b5c], 0xffffffff
call fcn.00401e80
mov eax, dword [0x40edf0]
mov edx, dword [0x40edec]
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x18], edx
mov ecx, 0xe
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
mov eax, dword [esi + 8]
test eax, eax
mov word [esp + 0x18], bx
je 0x404608
cmp word [eax], 0
je 0x404608
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x6d4]
push edx
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea eax, [esp + 0x6d0]
push eax
call fcn.00406154
lea eax, [esp + eax*2 + 0x6d4]
add esp, 4
mov dword [esp + 0x10], eax
cmp word [eax - 2], 0x5c
je 0x40437e
mov word [eax], 0x5c
mov eax, dword [esp + 0x10]
add eax, 2
mov dword [esp + 0x10], eax
mov word [eax], 0
lea ecx, [esp + 0x18]
push ecx
call fcn.00406154
lea edx, [esp + eax*2 + 0x1c]
lea eax, [esp + 0x6d4]
push eax
lea ecx, [esp + 0x1338]
push ecx
mov dword [esp + 0x1c], edx
call fcn.004066a3
lea edx, [esp + 0x133c]
push str.COMMAND.COM
push edx
call fcn.00406679
mov eax, dword [esi + 0xc]
add esp, 0x14
cmp eax, 1
je 0x404436
cmp eax, 2
je 0x404436
cmp eax, 3
je 0x404436
lea eax, [esp + 0x6d0]
push eax
lea ecx, [esp + 0x153c]
push ecx
call fcn.004066a3
lea edx, [esp + 0x1540]
push str.KERNEL.SYS
push edx
call fcn.00406679
mov eax, dword [esp + 0x20]
push str.KERNEL.SYS
push eax
call fcn.004066a3
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileW]
add esp, 0x18
push 0
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x1540]
push edx
call esi
test eax, eax
je 0x404653
push 7
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x404514
lea ecx, [esp + 0x6d0]
push ecx
lea edx, [esp + 0x194c]
push edx
call fcn.004066a3
lea eax, [esp + 0x1950]
push str.IO.SYS
push eax
call fcn.00406679
lea ecx, [esp + 0x6e0]
push ecx
lea edx, [esp + 0x1754]
push edx
call fcn.004066a3
lea eax, [esp + 0x1758]
push str.MSDOS.SYS
push eax
call fcn.00406679
mov ecx, dword [esp + 0x30]
push str.IO.SYS
push ecx
call fcn.004066a3
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileW]
add esp, 0x28
push 0
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x1950]
push eax
call esi
test eax, eax
je 0x404653
mov ebx, dword [ebp + 0xc]
cmp dword [ebx + 0xc], 3
jne 0x4044cb
lea ecx, [esp + 0x18]
push ecx
call fcn.00403a80
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 7
lea edx, [esp + 0x1c]
push edx
call edi
mov eax, dword [esp + 0x10]
push str.MSDOS.SYS
push eax
call fcn.004066a3
add esp, 8
push 0
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x1748]
push edx
call esi
test eax, eax
jne 0x40450b
cmp dword [ebx + 0xc], 1
je 0x404653
push 7
lea eax, [esp + 0x1c]
push eax
call edi
mov eax, dword [0x414320]
test eax, eax
je 0x404622
lea ecx, [esp + 0x8d8]
push str.rompaq.
push ecx
call fcn.004066a3
add esp, 8
lea edx, [esp + 0x10e0]
push edx
lea eax, [esp + 0x8dc]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4045de
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ecx]
test byte [esp + 0x10e0], 0x10
jne 0x4045cb
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x110c]
push ecx
push edx
call fcn.004066a3
lea eax, [esp + 0x8e0]
push str.rompaq_
push eax
call fcn.004066a3
lea ecx, [esp + 0x111c]
push ecx
lea edx, [esp + 0x8ec]
push edx
call fcn.00406679
add esp, 0x18
push 0
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x8e0]
push ecx
call esi
test eax, eax
jne 0x4045cb
call ebx
push eax
push str.CopyFile
call fcn.00401120
add esp, 8
lea edx, [esp + 0x10e0]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x404560
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0xc], 3
jne 0x4045fb
lea ecx, [esp + 0x18]
push ecx
call fcn.00403c30
add esp, 4
push 7
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, 1
mov ecx, dword [esp + 0x1b54]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Copying_COMMAND.COM..._r
call fcn.00406ad1
mov eax, dword [esp + 0x14]
push str.COMMAND.COM
push eax
call fcn.004066a3
add esp, 0xc
push 0
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x1338]
push edx
call esi
test eax, eax
jne 0x4045e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CopyFile
call fcn.00401120
mov ecx, dword [esp + 0x1b5c]
add esp, 8
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret