Function at 0x10022040
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1016e146
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x101c6270]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x9c], edi
mov edx, dword [edi + 0x10]
xor eax, eax
mov ebx, dword [ebp + 8]
mov ecx, edx
mov dword [ebp - 0x94], ebx
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
lea esi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100220a0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x70]
call fcn.10004470
push 1
push 0x101a3b4c
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], 0
call fcn.1000b3c0
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100220d4
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x70]
call fcn.1000b3c0
push ecx
lea ecx, [ebp - 0x154]
call fcn.10024690
mov esi, 7
mov dword [ebp - 0x48], 0
xor eax, eax
mov dword [ebp - 0x44], esi
mov word [ebp - 0x58], ax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], esi
mov word [ebp - 0x28], ax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], esi
mov word [ebp - 0x88], ax
sub esp, 8
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x144]
push dword [edi + 0x14]
call fcn.10025660
test eax, eax
lea ecx, [ebp - 0x154]
mov eax, dword [ebp - 0x154]
push 0
mov eax, dword [eax + 4]
jne 0x10022163
mov edx, dword [ecx + eax + 0xc]
add ecx, eax
or edx, 2
mov eax, edx
or eax, 4
cmp dword [ecx + 0x38], 0
jmp 0x1002216f
add ecx, eax
xor edx, edx
mov eax, 4
cmp dword [ecx + 0x38], edx
cmovne eax, edx
push eax
call fcn.1000d0c0
cmp dword [ebp - 0xf8], 0
je 0x100224ec
push 9
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x154]
push eax
call fcn.10025fd0
add esp, 0xc
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
test byte [ecx + eax + 0xc], 6
jne 0x100224af
mov dword [ebp - 0x98], 0xffffffff
nop dword [eax]
nop dword [eax + eax]
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0x154]
call fcn.10025e10
mov ebx, dword [ebp - 0x14]
lea esi, [ebp - 0x28]
mov edi, dword [ebp - 0x28]
cmp ebx, 8
mov ecx, dword [ebp - 0x18]
cmovae esi, edi
test ecx, ecx
je 0x10022289
lea edx, [ecx - 1]
cmp edx, 0xffffffff
mov dword [ebp - 0x8c], edx
lea edx, [ebp - 0x98]
lea eax, [ebp - 0x8c]
cmovae eax, edx
mov eax, dword [eax]
cmp word [esi + eax*2], 0xa
lea edx, [esi + eax*2]
je 0x1002221d
nop
cmp edx, esi
je 0x10022289
sub edx, 2
cmp word [edx], 0xa
jne 0x10022210
sub edx, esi
sar edx, 1
cmp edx, 0xffffffff
je 0x10022289
cmp ecx, edx
jb 0x100225d4
sub ecx, edx
lea eax, [ebp - 0x28]
cmp ecx, 1
ja 0x10022249
cmp ebx, 8
mov dword [ebp - 0x18], edx
cmovae eax, edi
xor ecx, ecx
mov word [eax + edx*2], cx
jmp 0x10022280
mov esi, dword [ebp - 0x8c]
cmp ebx, 8
cmovae eax, edi
lea ecx, [eax + edx*2]
mov eax, esi
sub eax, edx
add eax, eax
push eax
lea eax, [ecx + 2]
push eax
push ecx
call fcn.1012ad00
add esp, 0xc
mov dword [ebp - 0x18], esi
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
xor ecx, ecx
mov word [eax + esi*2], cx
mov edi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x14]
cmp ebx, 8
mov dword [ebp - 0x90], 0xffffffff
lea edx, [ebp - 0x28]
cmovae edx, edi
test ecx, ecx
je 0x1002233d
lea esi, [ecx - 1]
cmp esi, 0xffffffff
mov dword [ebp - 0x8c], esi
lea ebx, [ebp - 0x90]
lea eax, [ebp - 0x8c]
cmovae eax, ebx
mov ebx, dword [ebp - 0x14]
mov eax, dword [eax]
cmp word [edx + eax*2], 0xd
lea eax, [edx + eax*2]
je 0x100222dd
nop
cmp eax, edx
je 0x1002233d
sub eax, 2
cmp word [eax], 0xd
jne 0x100222d0
sub eax, edx
sar eax, 1
cmp eax, 0xffffffff
je 0x1002233d
cmp ecx, eax
jb 0x100225d4
sub ecx, eax
cmp ecx, 1
lea ecx, [ebp - 0x28]
ja 0x10022309
cmp ebx, 8
mov dword [ebp - 0x18], eax
cmovae ecx, edi
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x1002233a
cmp ebx, 8
cmovae ecx, edi
lea edx, [ecx + eax*2]
mov ecx, esi
sub ecx, eax
lea eax, [edx + 2]
add ecx, ecx
push ecx
push eax
push edx
call fcn.1012ad00
add esp, 0xc
mov dword [ebp - 0x18], esi
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
xor ecx, ecx
mov word [eax + esi*2], cx
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x94]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10022346
mov esi, dword [ebp - 0x48]
lea edi, [ebp - 0x8c]
sub ecx, edx
mov dword [ebp - 0x8c], esi
sar ecx, 1
lea edx, [ebp - 0x58]
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x90]
mov dword [ebp - 0x90], ecx
cmovae edx, dword [ebp - 0x58]
cmp ecx, esi
mov esi, dword [ebp - 0x94]
cmovae eax, edi
mov edi, dword [eax]
test edi, edi
je 0x100223af
nop dword [eax]
mov ax, word [edx]
cmp ax, word [esi]
jne 0x100223a5
add edx, 2
add esi, 2
sub edi, 1
jne 0x10022390
jmp 0x100223af
sbb eax, eax
and eax, 0xfffffffe
add eax, 1
jne 0x100223bf
mov eax, dword [ebp - 0x48]
cmp ecx, eax
jbe 0x100223bb
or eax, 0xffffffff
jmp 0x100223bf
sbb eax, eax
neg eax
test eax, eax
jne 0x1002248a
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov eax, dword [ebp - 0x9c]
lea esi, [ebp - 0x28]
mov byte [ebp - 4], 5
cmp ebx, 8
cmovae esi, dword [ebp - 0x28]
mov edx, dword [eax + 0x10]
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100223f1
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x40]
call fcn.10004470
push 1
push 0x101a3b4c
lea ecx, [ebp - 0x40]
call fcn.1000b3c0
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10022420
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x40]
call fcn.1000b3c0
lea ecx, [ebp - 0x40]
call fcn.100215e0
test al, al
je 0x10022471
lea ecx, [ebp - 0x40]
call fcn.100219e0
test al, al
je 0x10022471
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x40]
push 0
cmovae ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x70]
cmp dword [ebp - 0x5c], 8
push ecx
cmovae eax, dword [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x1002248a
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.10004630
push 9
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x154]
push eax
call fcn.10025fd0
add esp, 0xc
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
test byte [ecx + eax + 0xc], 6
je 0x100221c0
lea ecx, [ebp - 0x144]
call fcn.100255a0
test eax, eax
jne 0x100224e9
mov eax, dword [ebp - 0x154]
lea ecx, [ebp - 0x154]
push 0
mov eax, dword [eax + 4]
add ecx, eax
mov edx, dword [ecx + 0xc]
or edx, 2
mov eax, edx
or eax, 4
cmp dword [ecx + 0x38], 0
cmovne eax, edx
push eax
call fcn.1000d0c0
mov esi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x10022501
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.10004630
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp esi, 8
jb 0x10022529
lea eax, [esi + 1]
push eax
push dword [ebp - 0x58]
lea ecx, [ebp - 0x58]
call fcn.10004630
mov eax, dword [ebp - 0x154]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ifstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x154]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x158], eax
lea ecx, [ebp - 0x144]
call fcn.10024ff0
mov eax, dword [ebp - 0x154]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x154]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [ebp + ecx - 0x158], eax
lea eax, [ebp - 0xe4]
mov byte [ebp - 4], 6
push eax
mov dword [ebp - 0xe4], vtable.std::ios_base.0
call fcn.101110c6
mov eax, dword [ebp - 0x5c]
add esp, 4
cmp eax, 8
jb 0x100225b4
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.10004630
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1010f54f
mov esp, ebp
pop ebp
ret 4
call fcn.100040e0
int3