Function at 0x4cb140
Capabilities:
Copy file

Disassembly:
mov eax, dword [str.resource]
sub esp, 0x208
push ebx
mov ebx, ecx
mov cl, byte [eax]
push ebp
push esi
xor esi, esi
test cl, cl
push edi
je 0x4cb2ad
mov edi, 0x575c68
test esi, esi
jne 0x4cb2b5
mov ecx, dword [ebx + 0x20]
test ecx, ecx
je 0x4cb1b9
call fcn.004d4ab0
test eax, eax
je 0x4cb1b9
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
mov edx, dword [ecx*4 + 0x575298]
movsx ecx, byte [0x575268]
push edx
push eax
push ecx
mov ecx, dword [ebx + 0x20]
call fcn.004d4ab0
movsx edx, byte [0x575268]
push eax
mov eax, dword [edi]
push edx
push eax
lea ecx, [esp + 0x28]
push str._s_c_s_c_d._s
push ecx
call fcn.005308a0
add esp, 0x20
jmp 0x4cb1e5
mov edx, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
mov eax, dword [edx*4 + 0x575298]
movsx edx, byte [0x575268]
push eax
mov eax, dword [edi]
push ecx
push edx
push eax
lea ecx, [esp + 0x20]
push str._s_c_d._s
push ecx
call fcn.005308a0
add esp, 0x18
lea edx, [esp + 0x10]
push 0x55b8b8
push edx
call fcn.00530d40
mov esi, eax
mov eax, dword [0x5a32d8]
add esp, 8
test eax, eax
jne 0x4cb29e
test esi, esi
jne 0x4cb29e
mov ecx, dword [ebx + 0x20]
test ecx, ecx
je 0x4cb25d
call fcn.004d4ab0
test eax, eax
je 0x4cb25d
mov eax, dword [ebx + 8]
mov edx, dword [ebx + 0xc]
mov ecx, dword [eax*4 + 0x575298]
movsx eax, byte [0x575268]
push ecx
mov ecx, dword [ebx + 0x20]
push edx
push eax
call fcn.004d4ab0
movsx ecx, byte [0x575268]
mov edx, dword [edi]
push eax
push ecx
push edx
lea eax, [esp + 0x28]
push str._s_c_s_coptional_c_d._s
push eax
call fcn.005308a0
add esp, 0x20
jmp 0x4cb28a
mov ecx, dword [ebx + 8]
movsx eax, byte [0x575268]
mov edx, dword [ecx*4 + 0x575298]
mov ecx, dword [ebx + 0xc]
push edx
mov edx, dword [edi]
push ecx
push eax
push eax
push edx
lea eax, [esp + 0x24]
push str._s_coptional_c_d._s
push eax
call fcn.005308a0
add esp, 0x1c
lea ecx, [esp + 0x10]
push 0x55b8b8
push ecx
call fcn.00530d40
add esp, 8
mov esi, eax
mov edx, dword [edi + 4]
add edi, 4
cmp byte [edx], 0
jne 0x4cb162
test esi, esi
je 0x4cb417
push esi
call fcn.00532820
add esp, 4
mov edi, eax
push 2
push 0
push esi
call fcn.00531340
add esp, 0xc
push esi
call fcn.00532820
add esp, 4
mov ebp, eax
push 0
push edi
push esi
call fcn.00531340
add esp, 0xc
mov dword [ebx + 0x1c], ebp
push 0x18
call fcn.004d8630
add esp, 4
test eax, eax
je 0x4cb302
mov ecx, dword [ebx + 0x1c]
push ecx
mov ecx, eax
call fcn.004d4170
jmp 0x4cb304
xor eax, eax
mov ecx, eax
mov dword [ebx + 0x28], eax
call fcn.004d4220
mov edx, dword [ebx + 0x1c]
push esi
push 1
push edx
push eax
mov dword [ebx + 0x2c], eax
call fcn.00530d60
add esp, 0x10
push esi
call fcn.00530ca0
mov eax, dword [0x5a0030]
add esp, 4
test eax, eax
je 0x4cb3ae
mov edi, str.prfout
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x114]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push ecx
call fcn.005329d0
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x114]
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x114]
and ecx, 3
push 1
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov eax, dword [0x5a0038]
test eax, eax
je 0x4cb417
mov eax, dword [ebx + 8]
dec eax
je 0x4cb3ed
sub eax, 7
je 0x4cb3d9
lea edx, [esp + 0x114]
push str.unknown_resource_type_n
push edx
call fcn.005308a0
add esp, 8
jmp 0x4cb407
mov ebx, dword [ebx + 0xc]
lea eax, [esp + 0x114]
push ebx
push ebx
push str.file_TEX____d___.._resource_d.TEX__n
push eax
jmp 0x4cb3ff
mov ebx, dword [ebx + 0xc]
lea ecx, [esp + 0x114]
push ebx
push ebx
push str.file_WAVE___d___.._resource_d.WAV__n
push ecx
call fcn.005308a0
add esp, 0x10
lea edx, [esp + 0x114]
push edx
call fcn.004f07d0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret