Function at 0x508d30
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xe
push 0
push 0
dec ecx
jne 0x508d38
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004060c4
xor eax, eax
push ebp
push 0x50941e
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax - 4]
add eax, 0x3bc
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x3b8]
call fcn.004060dc
mov dl, 1
mov eax, dword [0x41f8e4]
call fcn.00424670
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 8]
xor edx, edx
call fcn.00406130
xor eax, eax
push ebp
push 0x508dba
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
call dword [ecx + 0x68]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x508dc4
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
call dword [edx + 0x50]
mov edx, eax
lea eax, [ebp - 8]
call fcn.00406298
lea eax, [ebp - 0xc]
xor edx, edx
call fcn.00406130
mov eax, dword [ebp - 8]
test eax, eax
je 0x508dfd
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x508dfd
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.004056d0
test eax, eax
je 0x508e06
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jle 0x508e42
mov ebx, dword [ebp - 0x28]
test ebx, ebx
jle 0x508e42
mov edi, 1
cmp edi, 0x12c
jg 0x508e42
lea eax, [ebp - 0x38]
mov edx, dword [ebp - 8]
movzx edx, word [edx + edi*2 - 2]
call fcn.00406258
mov edx, dword [ebp - 0x38]
lea eax, [ebp - 0xc]
call fcn.00406500
inc edi
dec ebx
jne 0x508e1b
lea edx, [ebp - 0x3c]
mov eax, dword [ebp - 0xc]
call fcn.0040ca98
mov edx, dword [ebp - 0x3c]
mov eax, 0x509438
call fcn.00406bb0
test eax, eax
jle 0x508eb8
mov eax, dword [ebp - 4]
call fcn.005065c8
mov ebx, eax
call fcn.00415720
cmp ebx, eax
jne 0x508eb8
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
call dword [edx + 0x44]
xor eax, eax
push ebp
push 0x508ea3
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.00415830
mov ecx, eax
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x1c]
mov ebx, dword [eax]
call dword [ebx + 0x6c]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x508ead
lea edx, [ebp - 8]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [ebp - 0x1c]
call fcn.0040426c
mov eax, dword [ebp - 8]
test eax, eax
je 0x508edd
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x508edd
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.004056d0
test eax, eax
je 0x508ee6
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x5093f6
mov byte [ebp - 0x2d], 0
mov byte [ebp - 0x2e], 0
xor eax, eax
mov dword [ebp - 0x2c], eax
mov dl, 1
mov eax, dword [0x41f8e4]
call fcn.00424670
mov dword [ebp - 0x20], eax
mov dl, 1
mov eax, dword [ebp - 0x20]
call fcn.0042445c
lea edx, [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.0040df98
mov ebx, dword [ebp - 0x28]
test ebx, ebx
jle 0x5093d8
mov esi, 1
mov eax, dword [ebp - 8]
test eax, eax
je 0x508f51
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x508f51
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.004056d0
cmp word [eax + esi*2 - 2], 0x3c
jne 0x508ff1
mov byte [ebp - 0x2d], 1
mov eax, dword [ebp - 8]
test eax, eax
je 0x508f7e
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x508f7e
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.004056d0
cmp word [eax + esi*2], 0x69
jne 0x508f89
mov al, 1
jmp 0x508fae
mov eax, dword [ebp - 8]
test eax, eax
je 0x508fa6
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x508fa6
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.004056d0
cmp word [eax + esi*2], 0x49
sete al
test al, al
je 0x5093d0
lea eax, [ebp - 0x44]
push eax
lea edx, [esi + 1]
mov ecx, 3
mov eax, dword [ebp - 8]
call fcn.00406898
mov eax, dword [ebp - 0x44]
lea edx, [ebp - 0x40]
call fcn.0040cb28
mov eax, dword [ebp - 0x40]
mov edx, 0x509450
call fcn.00406890
jne 0x5093d0
mov byte [ebp - 0x2e], 1
jmp 0x5093d0
mov eax, dword [ebp - 8]
test eax, eax
je 0x50900e
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x50900e
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.004056d0
cmp word [eax + esi*2 - 2], 0x3e
jne 0x509023
mov byte [ebp - 0x2d], 0
mov byte [ebp - 0x2e], 0
jmp 0x5093d0
movzx eax, byte [ebp - 0x2e]
and al, byte [ebp - 0x2d]
je 0x5093d0
mov eax, dword [ebp - 8]
test eax, eax
je 0x50904d
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x50904d
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.004056d0
cmp word [eax + esi*2 - 2], 0x20
jne 0x5093d0
lea eax, [ebp - 0x4c]
push eax
lea edx, [esi + 1]
mov ecx, 4
mov eax, dword [ebp - 8]
call fcn.00406898
mov eax, dword [ebp - 0x4c]
lea edx, [ebp - 0x48]
call fcn.0040cb28
mov eax, dword [ebp - 0x48]
mov edx, 0x509464
call fcn.00406890
jne 0x5093d0
mov eax, dword [ebp - 8]
test eax, eax
je 0x5090a8
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x5090a8
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.004056d0
movzx edi, word [eax + esi*2 + 8]
lea eax, [esi + 6]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x14]
xor edx, edx
call fcn.00406130
jmp 0x5090e0
lea eax, [ebp - 0x50]
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x24]
movzx edx, word [edx + ecx*2 - 2]
call fcn.00406258
mov edx, dword [ebp - 0x50]
lea eax, [ebp - 0x14]
call fcn.00406500
inc dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x28]
jge 0x5090fa
lea eax, [ebp - 8]
call fcn.004056e0
mov edx, dword [ebp - 0x24]
cmp di, word [eax + edx*2 - 2]
jne 0x5090bf
lea edx, [ebp - 0x54]
mov eax, dword [ebp - 0x14]
call fcn.0040cb28
mov edx, dword [ebp - 0x54]
mov eax, 0x50947c
call fcn.00406bb0
dec eax
je 0x5093d0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
call dword [ecx + 0x54]
inc eax
jne 0x5093d0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x20]
call fcn.00422c74
lea edx, [ebp - 0x58]
mov eax, dword [ebp - 0x14]
call fcn.0040e0d4
mov eax, dword [ebp - 0x58]
lea edx, [ebp - 0x18]
call fcn.0040cb28
mov eax, dword [ebp - 0x18]
call fcn.005066d4
test al, al
je 0x5093d0
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 0x14]
call fcn.0040cb28
mov edx, dword [ebp - 0x5c]
mov eax, 0x509498
call fcn.00406bb0
dec eax
jne 0x50921a
lea eax, [ebp - 0x14]
push eax
mov ecx, 0x7fffffff
mov edx, 9
mov eax, dword [ebp - 0x14]
call fcn.00406898
cmp dword [ebp - 0x14], 0
je 0x5093d0
mov eax, dword [ebp - 0x14]
call fcn.0040d9a0
test al, al
je 0x5093d0
inc dword [ebp - 0x2c]
push 0x5094b8
lea edx, [ebp - 0x60]
mov eax, dword [ebp - 0x2c]
call fcn.0040d1b4
push dword [ebp - 0x60]
push dword [ebp - 0x18]
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.004066a4
push 0xffffffffffffffff
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax - 4]
mov edx, dword [eax + 0x3bc]
lea eax, [ebp - 0x64]
mov ecx, dword [ebp - 0x10]
call fcn.004065c0
mov eax, dword [ebp - 0x64]
call fcn.00406168
push eax
mov eax, dword [ebp - 0x14]
call fcn.00406168
push eax
call sub.kernel32.dll_CopyFileW
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax - 8]
mov edx, dword [ebp - 0x10]
call fcn.00422c74
jmp 0x5093d0
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x509237
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x509237
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.004056d0
test eax, eax
je 0x509240
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x68]
push eax
mov ecx, 3
mov edx, 1
mov eax, dword [ebp - 0x14]
call fcn.00406898
mov eax, dword [ebp - 0x68]
mov edx, 0x5094d0
call fcn.00406890
jne 0x5092c6
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x509285
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x509285
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.004056d0
test eax, eax
je 0x50928e
sub eax, 4
mov eax, dword [eax]
dec eax
mov dword [ebp - 0x24], eax
jmp 0x509297
dec dword [ebp - 0x24]
cmp dword [ebp - 0x24], 0
jle 0x5092b0
lea eax, [ebp - 0xc]
call fcn.004056e0
mov edx, dword [ebp - 0x24]
cmp word [eax + edx*2 - 2], 0x5c
jne 0x509294
lea eax, [ebp - 0x14]
push eax
mov ecx, 0x7fffffff
mov edx, 4
mov eax, dword [ebp - 0x14]
call fcn.00406898
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x5092e3
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x5092e3
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x14]
call fcn.004056d0
test eax, eax
je 0x5092ec
sub eax, 4
mov eax, dword [eax]
test eax, eax
jle 0x509332
mov dword [ebp - 0x34], eax
mov edi, 1
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x509315
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x509315
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x14]
call fcn.004056d0
cmp word [eax + edi*2 - 2], 0x2f
jne 0x50932c
lea eax, [ebp - 0x14]
call fcn.00406b64
mov word [eax + edi*2 - 2], 0x5c
inc edi
dec dword [ebp - 0x34]
jne 0x5092f8
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp - 0x24]
mov edx, 1
mov eax, dword [ebp - 0xc]
call fcn.00406898
mov edx, dword [ebp - 0x6c]
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
call fcn.004065c0
cmp dword [ebp - 0x14], 0
je 0x5093d0
mov eax, dword [ebp - 0x14]
call fcn.0040d9a0
test al, al
je 0x5093d0
inc dword [ebp - 0x2c]
push 0x5094b8
lea edx, [ebp - 0x70]
mov eax, dword [ebp - 0x2c]
call fcn.0040d1b4
push dword [ebp - 0x70]
push dword [ebp - 0x18]
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.004066a4
push 0xffffffffffffffff
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax - 4]
mov edx, dword [eax + 0x3bc]
lea eax, [ebp - 0x74]
mov ecx, dword [ebp - 0x10]
call fcn.004065c0
mov eax, dword [ebp - 0x74]
call fcn.00406168
push eax
mov eax, dword [ebp - 0x14]
call fcn.00406168
push eax
call sub.kernel32.dll_CopyFileW
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax - 8]
mov edx, dword [ebp - 0x10]
call fcn.00422c74
inc esi
dec ebx
jne 0x508f34
mov eax, dword [ebp - 0x20]
call fcn.0040426c
mov edx, 0x506144
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov eax, dword [eax - 8]
mov ecx, dword [eax]
call dword [ecx + 0xa4]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x509425
lea eax, [ebp - 0x74]
mov edx, 0x10
call fcn.004060d4
lea eax, [ebp - 0x18]
mov edx, 6
call fcn.004060d4
ret