Function at 0x40db04
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff08
push ebx
push esi
push edi
mov esi, 0x4c7868
mov edi, 0x4e3700
mov eax, 0x4c77e8
call fcn.004c5654
cmp dword [0x4ced1c], 0
je 0x40db97
mov edx, dword [0x4ced1c]
push dword [edx]
call fcn.00404151
pop ecx
test eax, eax
je 0x40db51
push 2
mov ecx, dword [0x4ced1c]
push ecx
mov eax, dword [ecx + 0xc]
call dword [eax + 0x24]
add esp, 8
mov edx, dword [0x4ced1c]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
je 0x40db8f
push 0xc
push dword [ebp - 4]
call fcn.004c5817
add esp, 8
mov ecx, dword [0x4e4444]
add dword [ecx], eax
mov word [ebp - 0x1c], 0x14
push 3
mov eax, dword [ebp - 4]
push eax
mov edx, dword [eax + 0xc]
call dword [edx]
add esp, 8
mov word [ebp - 0x1c], 8
xor ecx, ecx
mov dword [0x4ced1c], ecx
lea eax, [esi + 0x39]
push eax
lea edx, [ebp - 0x80]
push edx
call sub.cw3220.DLL__strcpy
add esp, 8
lea ecx, [esi + 0x3b]
push ecx
lea eax, [ebp - 0x80]
push eax
call sub.cw3220.DLL__strcat
add esp, 8
push 0x512
call sub.cw3220.DLL___bnew_qui
pop ecx
mov dword [ebp - 8], eax
test eax, eax
je 0x40dc16
mov word [ebp - 0x1c], 0x2c
push 0
add esp, 0xfffffffc
push 0xd
lea edx, [esp + 4]
push edx
call fcn.0040b680
add esp, 8
push dword [0x4e4434]
lea ecx, [esi + 0x40]
push ecx
lea eax, [ebp - 0x80]
push eax
push 0
push 0xa
push 0
push dword [ebp - 8]
call fcn.004530c6
add esp, 0x24
mov edx, dword [0x4e4444]
sub dword [edx], 0x29
mov word [ebp - 0x1c], 0x20
mov ecx, dword [ebp - 8]
jmp 0x40dc19
mov ecx, dword [ebp - 8]
mov dword [0x4ced1c], ecx
mov eax, dword [0x4ced1c]
push eax
mov edx, dword [eax + 0xc]
call dword [edx + 0x14]
pop ecx
dec eax
je 0x40dc8f
cmp dword [0x4ced1c], 0
je 0x40dc7d
mov eax, dword [0x4ced1c]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40dc75
push 0xc
push dword [ebp - 0xc]
call fcn.004c5817
add esp, 8
mov edx, dword [0x4e4444]
add dword [edx], eax
mov word [ebp - 0x1c], 0x44
push 3
mov ecx, dword [ebp - 0xc]
push ecx
mov eax, dword [ecx + 0xc]
call dword [eax]
add esp, 8
mov word [ebp - 0x1c], 0x38
xor edx, edx
mov dword [0x4ced1c], edx
or eax, 0xffffffff
mov edx, dword [ebp - 0x2c]
mov dword fs:[0], edx
jmp 0x40e051
push 0x4e2b98
lea ecx, [ebp - 0x80]
push ecx
call sub.cw3220.DLL__strcpy
add esp, 8
lea eax, [esi + 0x45]
push eax
lea edx, [ebp - 0x80]
push edx
call sub.cw3220.DLL__strcat
add esp, 8
push 0
lea ecx, [ebp - 0x80]
push ecx
call sub.cw3220.DLL__access
add esp, 8
test eax, eax
je 0x40dce9
lea eax, [esi + 0x4a]
push eax
lea edx, [ebp - 0x80]
push edx
call sub.cw3220.DLL__strcat
add esp, 8
call fcn.00491684
or eax, 0xffffffff
mov edx, dword [ebp - 0x2c]
mov dword fs:[0], edx
jmp 0x40e051
push edi
push 0x322
call fcn.0048e144
add esp, 8
lea ecx, [ebp - 0xbc]
push ecx
call fcn.00491795
pop ecx
inc eax
jne 0x40dd19
or eax, 0xffffffff
mov edx, dword [ebp - 0x2c]
mov dword fs:[0], edx
jmp 0x40e051
lea ecx, [ebp - 0xbc]
push ecx
lea eax, [ebp - 0x80]
push eax
call sub.cw3220.DLL__strcpy
add esp, 8
lea edx, [esi + 0x55]
push edx
lea ecx, [ebp - 0x80]
push ecx
call sub.cw3220.DLL__strcat
add esp, 8
jmp 0x40ddab
push edi
push 0x303
call fcn.0048e144
add esp, 8
call fcn.00491749
test eax, eax
je 0x40dd58
inc eax
jne 0x40ddbd
push edi
push 0x322
call fcn.0048e144
add esp, 8
lea eax, [ebp - 0xbc]
push eax
call fcn.00491795
pop ecx
inc eax
jne 0x40dd88
or eax, 0xffffffff
mov edx, dword [ebp - 0x2c]
mov dword fs:[0], edx
jmp 0x40e051
lea ecx, [ebp - 0xbc]
push ecx
lea eax, [ebp - 0x80]
push eax
call sub.cw3220.DLL__strcpy
add esp, 8
lea edx, [esi + 0x5a]
push edx
lea ecx, [ebp - 0x80]
push ecx
call sub.cw3220.DLL__strcat
add esp, 8
push 0
lea eax, [ebp - 0x80]
push eax
call sub.cw3220.DLL__access
add esp, 8
test eax, eax
je 0x40dd3e
lea edx, [esi + 0x5f]
push edx
lea ecx, [ebp - 0x80]
push ecx
call sub.cw3220.DLL__fopen
add esp, 8
mov ebx, eax
test ebx, ebx
jne 0x40ddf8
push edi
push 0x280
call fcn.0048e144
add esp, 8
call fcn.00491684
or eax, 0xffffffff
mov edx, dword [ebp - 0x2c]
mov dword fs:[0], edx
jmp 0x40e051
push 0x4e2b98
lea ecx, [ebp - 0x80]
push ecx
call sub.cw3220.DLL__strcpy
add esp, 8
lea eax, [esi + 0x62]
push eax
lea edx, [ebp - 0x80]
push edx
call sub.cw3220.DLL__strcat
add esp, 8
lea ecx, [esi + 0x67]
push ecx
lea eax, [ebp - 0x80]
push eax
call sub.cw3220.DLL__fopen
add esp, 8
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x40de4b
push ebx
call sub.cw3220.DLL__fclose
pop ecx
or eax, 0xffffffff
mov edx, dword [ebp - 0x2c]
mov dword fs:[0], edx
jmp 0x40e051
xor edi, edi
lea eax, [ebp - 0x34]
push eax
lea edx, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x44]
push ecx
lea eax, [esi + 0x6a]
push eax
push dword [ebp - 0x40]
call sub.cw3220.DLL__fscanf
add esp, 0x14
cmp eax, 3
jl 0x40df11
mov eax, dword [ebp - 0x44]
and eax, 0x800000ff
jns 0x40de82
dec eax
or eax, 0xffffff00
inc eax
test eax, eax
jl 0x40df11
mov edx, dword [ebp - 0x44]
sar edx, 0x10
mov dword [ebp - 0x38], edx
mov byte [ebp - 0x39], 0
cmp dword [ebp + 8], 0xcb
je 0x40dea7
cmp dword [ebp + 8], 0xca
xor ecx, ecx
mov cl, byte [ebp - 0x39]
shl ecx, 8
mov edx, dword [ebp - 0x38]
shl edx, 8
shl edx, 8
add ecx, edx
add ecx, eax
push ecx
lea eax, [esi + 0x74]
push eax
push ebx
call sub.cw3220.DLL__fprintf
add esp, 0xc
fld dword [ebp - 0x34]
add esp, 0xfffffff8
fstp qword [esp]
fld dword [ebp - 0x30]
add esp, 0xfffffff8
fstp qword [esp]
lea ecx, [esi + 0x78]
push ecx
push ebx
call sub.cw3220.DLL__fprintf
add esp, 0x18
inc edi
mov eax, edi
mov ecx, 5
cdq
idiv ecx
test edx, edx
jne 0x40de4d
lea eax, [esi + 0x83]
push eax
push ebx
call sub.cw3220.DLL__fprintf
add esp, 8
jmp 0x40de4d
push ebx
call sub.cw3220.DLL__fclose
pop ecx
push dword [ebp - 0x40]
call sub.cw3220.DLL__fclose
pop ecx
push 0x4e2b98
lea edx, [ebp - 0xf8]
push edx
call sub.cw3220.DLL__strcpy
add esp, 8
lea ecx, [esi + 0x85]
push ecx
lea eax, [ebp - 0xf8]
push eax
call sub.cw3220.DLL__strcat
add esp, 8
lea edx, [ebp - 0xbc]
push edx
lea ecx, [ebp - 0x80]
push ecx
call sub.cw3220.DLL__strcpy
add esp, 8
lea eax, [esi + 0x8a]
push eax
lea edx, [ebp - 0x80]
push edx
call sub.cw3220.DLL__strcat
add esp, 8
push 0
lea ecx, [ebp - 0x80]
push ecx
lea eax, [ebp - 0xf8]
push eax
call sub.KERNEL32.dll_CopyFileA
push 0x4e2b98
lea edx, [ebp - 0xf8]
push edx
call sub.cw3220.DLL__strcpy
add esp, 8
lea ecx, [esi + 0x8f]
push ecx
lea eax, [ebp - 0xf8]
push eax
call sub.cw3220.DLL__strcat
add esp, 8
lea edx, [ebp - 0xbc]
push edx
lea ecx, [ebp - 0x80]
push ecx
call sub.cw3220.DLL__strcpy
add esp, 8
lea eax, [esi + 0x94]
push eax
lea edx, [ebp - 0x80]
push edx
call sub.cw3220.DLL__strcat
add esp, 8
push 0
lea ecx, [ebp - 0x80]
push ecx
lea eax, [ebp - 0xf8]
push eax
call sub.KERNEL32.dll_CopyFileA
push 0x4e2b98
lea edx, [ebp - 0xf8]
push edx
call sub.cw3220.DLL__strcpy
add esp, 8
lea ecx, [esi + 0x99]
push ecx
lea eax, [ebp - 0xf8]
push eax
call sub.cw3220.DLL__strcat
add esp, 8
lea edx, [ebp - 0xbc]
push edx
lea ecx, [ebp - 0x80]
push ecx
call sub.cw3220.DLL__strcpy
add esp, 8
lea eax, [esi + 0x9e]
push eax
lea edx, [ebp - 0x80]
push edx
call sub.cw3220.DLL__strcat
add esp, 8
push 0
lea ecx, [ebp - 0x80]
push ecx
lea eax, [ebp - 0xf8]
push eax
call sub.KERNEL32.dll_CopyFileA
mov edx, dword [ebp - 0x2c]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret