Function at 0x497b00
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56e845
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x78
push ebx
push esi
push edi
mov esi, ecx
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x10], esp
call fcn.005332c3
mov eax, dword [0x5d2d10]
xor edi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 2
push eax
call fcn.0049ec70
add esp, 4
push 0x5c4800
lea ecx, [ebp - 0x20]
push eax
push ecx
mov byte [ebp - 4], 3
call fcn.00530e24
mov edx, dword [eax]
lea eax, [ebp - 0x14]
push edx
push str._sCommands.dat
push eax
mov byte [ebp - 4], 4
call fcn.00528823
add esp, 0xc
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call fcn.00530b8f
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.00530b8f
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.0049e1f0
add esp, 4
test eax, eax
jne 0x497bdb
lea edx, [ebp - 0x20]
push edx
call fcn.0049eba0
mov eax, dword [eax]
lea ecx, [ebp - 0x18]
push eax
push str._sCommands.dat
push ecx
mov byte [ebp - 4], 5
call fcn.00528823
add esp, 0x10
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 2
call fcn.00530b8f
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
push 1
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov ecx, dword [ebp - 0x14]
push edi
push 0x20
push ecx
lea ecx, [ebp - 0x40]
call fcn.00533475
test eax, eax
je 0x497df6
mov ecx, esi
call fcn.004970e0
push edi
push 0x1000
lea edx, [ebp - 0x40]
push 1
push edx
lea ecx, [ebp - 0x84]
call fcn.005369bd
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x5c]
mov byte [ebp - 4], 7
lea edx, [eax + 4]
cmp edx, ecx
jbe 0x497c38
sub eax, ecx
lea ecx, [ebp - 0x84]
add eax, 4
push eax
call fcn.00536d4a
mov ecx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x60]
mov edx, dword [eax]
add eax, 4
mov dword [esi + 0x20], edx
mov dword [ebp - 0x60], eax
lea edx, [eax + 4]
cmp edx, ecx
jbe 0x497c5e
sub eax, ecx
lea ecx, [ebp - 0x84]
add eax, 4
push eax
call fcn.00536d4a
mov eax, dword [ebp - 0x60]
mov ecx, dword [eax]
add eax, 4
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x20], edi
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
cmp eax, edx
jge 0x497e30
push 0x44
call fcn.00531c00
mov ecx, eax
add esp, 4
mov dword [ebp - 0x2c], ecx
cmp ecx, edi
mov byte [ebp - 4], 8
je 0x497ca0
push edi
push edi
push edi
call fcn.00496050
mov ebx, eax
mov dword [ebp - 0x1c], ebx
jmp 0x497ca5
mov dword [ebp - 0x1c], edi
mov ebx, edi
mov eax, dword [ebx]
lea ecx, [ebp - 0x84]
push ecx
mov ecx, ebx
mov byte [ebp - 4], 7
call dword [eax + 8]
mov ecx, dword [ebx + 0x20]
xor edx, edx
mov eax, ecx
mov dword [ebp - 0x2c], ecx
shr eax, 4
div dword [esi + 0xc]
mov eax, dword [esi + 8]
test eax, eax
mov edi, edx
mov dword [ebp - 0x28], edi
je 0x497ce7
mov eax, dword [eax + edi*4]
test eax, eax
je 0x497ce7
cmp dword [eax + 8], ecx
je 0x497db5
mov eax, dword [eax]
jmp 0x497cd6
mov eax, dword [esi + 8]
test eax, eax
jne 0x497d23
mov ebx, dword [esi + 0xc]
lea eax, [ebx*4]
push eax
call fcn.00531c00
lea ecx, [ebx*4]
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esi + 8], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [ebp - 0x28]
mov dword [esi + 0xc], ebx
mov eax, dword [esi + 0x14]
test eax, eax
jne 0x497d58
mov eax, dword [esi + 0x1c]
push 0x10
lea ecx, [esi + 0x18]
push eax
push ecx
call fcn.0052b922
mov ecx, dword [esi + 0x1c]
mov edx, ecx
shl edx, 4
dec ecx
lea eax, [edx + eax - 0xc]
test ecx, ecx
jl 0x497d58
mov edx, dword [esi + 0x14]
dec ecx
mov dword [eax], edx
mov dword [esi + 0x14], eax
sub eax, 0x10
jmp 0x497d46
mov eax, dword [esi + 0x14]
mov edx, 1
mov ecx, dword [eax]
mov dword [esi + 0x14], ecx
mov ecx, dword [esi + 0x10]
inc ecx
mov dword [esi + 0x10], ecx
lea ecx, [eax + 8]
mov dword [ecx], 0
mov ebx, edx
dec edx
test ebx, ebx
je 0x497d81
add ecx, 4
jmp 0x497d75
lea ecx, [eax + 0xc]
mov edx, 1
mov dword [ecx], 0
mov ebx, edx
dec edx
test ebx, ebx
je 0x497d9b
add ecx, 4
jmp 0x497d8f
mov edx, dword [ebp - 0x2c]
mov dword [eax + 4], edi
mov dword [eax + 8], edx
mov ecx, dword [esi + 8]
mov ebx, dword [ebp - 0x1c]
mov edx, dword [ecx + edi*4]
mov dword [eax], edx
mov ecx, dword [esi + 8]
mov dword [ecx + edi*4], eax
mov dword [eax + 0xc], ebx
mov eax, dword [ebp - 0x20]
inc eax
xor edi, edi
mov dword [ebp - 0x20], eax
jmp 0x497c6c
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.00530b8f
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.00530b8f
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0xffffffff
call fcn.005333b8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x84]
mov dword [ebp - 4], 6
call fcn.00536b21
lea ecx, [ebp - 0x40]
call fcn.00533690
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 2
call fcn.00536a99
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.00530b8f
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.00530b8f
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0xffffffff
call fcn.005333b8
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret