Function at 0x40cd30
Capabilities:
Copy file
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x439f66
mov eax, dword fs:[0]
push eax
sub esp, 0xd98
mov eax, dword [0x449cd0]
xor eax, esp
mov dword [esp + 0xd94], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x449cd0]
xor eax, esp
push eax
lea eax, [esp + 0xdac]
mov dword fs:[0], eax
mov eax, dword [esp + 0xdc4]
mov esi, dword [esp + 0xdbc]
push 0x13f
lea ecx, [esp + 0x59]
push 0
push ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x28], 0
mov byte [esp + 0x60], 0
call fcn.0041ec20
push 0x7d000
call fcn.0040f12f
mov dword [esp + 0x30], eax
xor eax, eax
push 0x104
push eax
lea edx, [esp + 0x2b0]
push edx
mov byte [esp + 0x50], 0
mov dword [esp + 0x51], eax
mov dword [esp + 0x55], eax
mov dword [esp + 0x59], eax
mov dword [esp + 0x5d], eax
mov dword [esp + 0x61], eax
mov dword [esp + 0x65], eax
mov dword [esp + 0x69], eax
mov word [esp + 0x6d], ax
mov byte [esp + 0x6f], al
call fcn.0041ec20
lea eax, [esp + 0x50]
push 0x20
push eax
call fcn.004012a0
push 0x43b560
push esi
call fcn.0041e83b
add esp, 0x2c
mov dword [esp + 0x18], eax
test eax, eax
je 0x40d313
push eax
call fcn.0041e452
add esp, 4
test eax, eax
jne 0x40d002
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x20]
push esi
mov dword [ebx], 0
call fcn.0041eb9e
push esi
push 0x7d000
push 1
push ebx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
call fcn.0041e75a
mov edi, eax
add esp, 0x14
xor esi, esi
mov dword [esp + 0x30], edi
test edi, edi
jbe 0x40cfed
lea esp, [esp]
lea ecx, [esp + 0x34]
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40ce86
test dl, dl
je 0x40ce82
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40ce86
add eax, 2
add ecx, 2
test dl, dl
jne 0x40ce66
xor eax, eax
jmp 0x40ce8b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40cea4
add esi, 0x200
add ebx, 0x200
cmp esi, edi
jb 0x40ce60
jmp 0x40cfed
mov eax, dword [esp + 0xdc0]
lea edx, [esp + 0x54]
mov dword [esp + 0x14], esi
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40ceb5
lea edi, [esp + 0x54]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40cec4
mov bp, word [0x43b574]
lea eax, [ebx + 0x90]
mov word [edi], bp
mov ecx, eax
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40cee0
lea edi, [esp + 0x54]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40cef0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [ebx + 0x2c]
mov edx, 0x43b830
mov ecx, esi
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x40cf30
test al, al
je 0x40cf2c
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x40cf30
add ecx, 2
add edx, 2
test al, al
jne 0x40cf10
xor eax, eax
jmp 0x40cf35
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40cf9a
mov ecx, dword [esp + 0xdc0]
lea eax, [esp + 0x298]
sub eax, ecx
lea esp, [esp]
mov dl, byte [ecx]
mov byte [eax + ecx], dl
inc ecx
test dl, dl
jne 0x40cf50
lea edi, [esp + 0x298]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40cf62
mov eax, esi
mov word [edi], bp
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40cf71
lea edi, [esp + 0x298]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40cf84
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x18]
push 0
push 0
push 0
push esi
call fcn.0041ed36
mov edx, dword [ebx + 0x20]
push 0
lea ecx, [ebx + 0x24]
push ecx
push edx
lea eax, [esp + 0x70]
push eax
push esi
call fcn.0040beb0
mov edi, dword [esp + 0x38]
mov ecx, dword [ebx + 0xf4]
mov eax, edi
cdq
xor ebx, ebx
add ecx, eax
adc ebx, edx
add ecx, dword [esp + 0x48]
push 0
adc ebx, dword [esp + 0x50]
push ebx
push ecx
push esi
call fcn.0041ed36
add esp, 0x34
cmp edi, dword [esp + 0x30]
jb 0x40d002
mov edx, dword [esp + 0x18]
push edx
call fcn.0041e452
add esp, 4
test eax, eax
je 0x40ce1f
push 0x400
lea eax, [esp + 0x6ac]
push 0
push eax
call fcn.0041ec20
mov ecx, dword [esp + 0x24]
push ecx
call fcn.0041e452
add esp, 0x10
test eax, eax
jne 0x40d306
jmp 0x40d030
mov edi, dword [esp + 0x18]
push edi
push 0x400
lea edx, [esp + 0x6b0]
push 1
push edx
call fcn.0041e75a
push edi
mov esi, eax
call fcn.0041eb9e
add esp, 0x14
mov ebx, eax
mov ebp, edx
cmp esi, 0x400
jne 0x40d2f1
mov ecx, str.LeaderCab
lea eax, [esp + 0x6a8]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40d090
test dl, dl
je 0x40d08c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40d090
add eax, 2
add ecx, 2
test dl, dl
jne 0x40d070
xor eax, eax
jmp 0x40d095
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40d2f1
push 0x104
push eax
lea eax, [esp + 0x5c]
push eax
call fcn.0041ec20
mov eax, dword [esp + 0xdcc]
lea edx, [esp + 0x60]
add esp, 0xc
sub edx, eax
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40d0c0
lea edi, [esp + 0x54]
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40d0d0
mov cx, word [0x43b574]
lea edx, [esp + 0x6cc]
mov word [edi], cx
push edx
lea ecx, [esp + 0x18]
call fcn.00402ae0
mov edx, dword [esp + 0x14]
mov esi, dword [edx - 0xc]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
mov dword [esp + 0xdb4], 0
jge 0x40d124
push esi
lea ecx, [esp + 0x18]
call fcn.004016b0
mov edx, dword [esp + 0x14]
lea eax, [esi + 1]
push eax
push edx
call fcn.0041dd9f
push eax
call fcn.00401140
add esp, 0xc
test esi, esi
jl 0x40d36e
mov eax, dword [esp + 0x14]
cmp esi, dword [eax - 8]
jg 0x40d36e
mov dword [eax - 0xc], esi
mov ecx, dword [esp + 0x14]
mov byte [esi + ecx], 0
call fcn.00407e20
test eax, eax
je 0x40d1ae
mov edx, dword [esp + 0x14]
push str.LDX64.EXE
push edx
call fcn.0041fc71
add esp, 8
test eax, eax
sete al
test al, al
je 0x40d18a
lea eax, [esp + 0x54]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40d180
jmp 0x40d1d8
lea eax, [esp + 0x6cc]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d193
lea edi, [esp + 0x54]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40d1a1
jmp 0x40d25e
mov eax, dword [esp + 0x14]
push str.LDX32.EXE
push eax
call fcn.0041fc71
add esp, 8
test eax, eax
sete al
test al, al
je 0x40d1ee
lea eax, [esp + 0x54]
dec eax
mov edi, edi
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40d1d0
mov ecx, dword [str.Ldx.exe]
mov edx, dword [0x43c33c]
mov dword [eax], ecx
mov dword [eax + 4], edx
jmp 0x40d26e
mov eax, dword [esp + 0x14]
push str.LDDISK32.SYS
push eax
call fcn.0041fc71
add esp, 8
test eax, eax
sete al
test al, al
je 0x40d23f
lea eax, [esp + 0x54]
dec eax
mov edi, edi
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40d210
mov ecx, dword [str.Lddisk.sys]
mov edx, dword [0x43c320]
mov dword [eax], ecx
mov cx, word [0x43c324]
mov dword [eax + 4], edx
mov dl, byte [0x43c326]
mov word [eax + 8], cx
mov byte [eax + 0xa], dl
jmp 0x40d26e
lea eax, [esp + 0x6cc]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d248
lea edi, [esp + 0x54]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40d256
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x18]
push 0
push ebp
push ebx
push esi
call fcn.0041ed36
mov eax, dword [esp + 0x6d8]
mov edx, dword [esp + 0x748]
push eax
lea ecx, [esp + 0x744]
push ecx
push edx
lea eax, [esp + 0x70]
push eax
push esi
call fcn.0040beb0
mov ecx, dword [esp + 0x75c]
mov edx, dword [esp + 0x760]
add ecx, ebx
push 0
adc edx, ebp
push edx
push ecx
push esi
call fcn.0041ed36
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
add esp, 0x34
mov dword [esp + 0x1c], 2
mov dword [esp + 0xdb4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d2f1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0041e452
add esp, 4
test eax, eax
je 0x40d030
mov edx, dword [esp + 0x18]
push edx
call fcn.0041e1f2
add esp, 4
mov eax, dword [esp + 0x20]
push eax
call fcn.0040f13a
lea ecx, [esp + 0x29c]
push ecx
call fcn.00407920
add esp, 8
test eax, eax
je 0x40d5db
push 0x103
lea edx, [esp + 0x199]
push 0
push edx
mov byte [esp + 0x1a0], 0
call fcn.0041ec20
add esp, 0xc
call fcn.00410194
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40d378
push 0x80004005
call fcn.00401330
push 0x80070057
call fcn.00401330
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0xba8]
push ecx
lea edx, [esp + 0xcac]
push edx
lea eax, [esp + 0xab0]
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x2a8]
push edx
mov dword [esp + 0xdc8], 1
call fcn.004201e7
push 0x43c318
push 0x43c314
lea eax, [esp + 0xac4]
push eax
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x3c0]
push edx
call fcn.0041ffd5
lea eax, [esp + 0x1bc]
push eax
call fcn.004078c0
lea eax, [esp + 0x1c0]
add esp, 0x2c
dec eax
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40d400
mov ecx, dword [str.Ldx.EN]
mov edx, dword [0x43c310]
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileA]
mov dword [eax], ecx
mov dword [eax + 4], edx
push 0
lea eax, [esp + 0x3a0]
push eax
lea ecx, [esp + 0x19c]
push ecx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push eax
lea edx, [esp + 0x3a0]
push edx
lea eax, [esp + 0x1c]
push str.Replace_CopyFile__s___d_
push eax
call fcn.00401ce0
mov ecx, dword [esp + 0x24]
add esp, 0x10
push 0
push ecx
mov ecx, 0x44b3c5
call fcn.0040aa20
push 0x104
lea edx, [esp + 0x198]
push 0
push edx
call fcn.0041ec20
lea eax, [esp + 0x1a0]
push eax
call fcn.004078c0
lea eax, [esp + 0x1a4]
add esp, 0x10
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40d493
mov ecx, dword [0x43c244]
mov edx, dword [0x43c248]
mov dword [eax], ecx
mov cl, byte [0x43c24c]
mov dword [eax + 4], edx
push 0
lea edx, [esp + 0x29c]
mov byte [eax + 8], cl
push edx
lea eax, [esp + 0x19c]
push eax
call esi
call edi
push eax
lea ecx, [esp + 0x29c]
push ecx
lea edx, [esp + 0x1c]
push str.Replace_CopyFile__s___d_
push edx
call fcn.00401ce0
mov ebp, dword [esp + 0x24]
add esp, 0x10
push 0
push ebp
mov ecx, 0x44b3c5
call fcn.0040aa20
push 0x207
lea eax, [esp + 0x4a5]
push 0
push eax
mov byte [esp + 0x4ac], 0
call fcn.0041ec20
lea eax, [esp + 0x4ac]
add esp, 0xc
dec eax
mov edi, edi
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40d520
mov ecx, dword [str.__Back__]
mov edx, dword [0x43c260]
mov dword [eax], ecx
mov cl, byte [0x43c264]
mov dword [eax + 4], edx
mov byte [eax + 8], cl
mov eax, dword [esp + 0x2c]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40d548
lea edi, [esp + 0x4a0]
sub eax, ecx
mov esi, ecx
dec edi
jmp 0x40d560
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40d560
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x4a0]
dec edi
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40d580
mov dx, word [0x43bd88]
push 1
lea eax, [esp + 0x4a4]
push eax
lea ecx, [esp + 0x2a0]
push ecx
mov word [edi], dx
call fcn.004083a0
lea eax, [ebp - 0x10]
add esp, 0xc
mov dword [esp + 0x1c], 3
mov dword [esp + 0xdb4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d5db
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0xdac]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xd94]
xor ecx, esp
call fcn.0041d4f4
add esp, 0xda4
ret