Function at 0x4052c0
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41ed61
mov eax, dword fs:[0]
push eax
sub esp, 0x1cc
mov eax, dword [0x429080]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebp + 8], 2
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x48], 0
jge 0x405382
push str.Usage:_utf8_bom_remover.exe_file_path
push 0x42a100
call fcn.004010d0
mov edi, eax
add esp, 8
mov ecx, dword [edi]
mov ecx, dword [ecx + 4]
mov ecx, dword [ecx + edi + 0x30]
mov esi, dword [ecx + 4]
mov ecx, esi
mov dword [ebp - 0x50], esi
mov eax, dword [esi]
call dword [eax + 4]
lea eax, [ebp - 0x54]
mov dword [ebp - 4], 0
push eax
call fcn.004015f0
add esp, 4
mov ecx, dword [eax]
push 0xa
mov edx, dword [ecx + 0x20]
mov ecx, eax
call edx
mov byte [ebp - 0x48], al
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x40536c
mov eax, dword [esi]
mov ecx, esi
mov eax, dword [eax + 8]
call eax
test eax, eax
je 0x40536c
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push dword [ebp - 0x48]
mov ecx, edi
call fcn.00404070
mov ecx, edi
call fcn.004037b0
jmp 0x4059d2
mov edx, dword [edx + 4]
xorps xmm0, xmm0
mov ecx, edx
mov dword [ebp - 0x4c], 0xbfbbef
mov dword [ebp - 0x5c], 0
movups xmmword [ebp - 0x40], xmm0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4053b0
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x40]
call fcn.004013d0
mov ecx, dword [ebp - 0x30]
mov eax, 0x7fffffff
sub eax, ecx
mov dword [ebp - 4], 1
mov dword [ebp - 0x48], ecx
cmp eax, 4
jb 0x4059ef
cmp dword [ebp - 0x2c], 0xf
lea eax, [ebp - 0x40]
lea edi, [ecx + 4]
mov dword [ebp - 0x18], 0
cmova eax, dword [ebp - 0x40]
lea esi, [ebp - 0x28]
mov edx, 0xf
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x14], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x28], xmm0
cmp edi, edx
jbe 0x40544f
mov eax, edi
or eax, edx
cmp eax, 0x7fffffff
jbe 0x405424
mov eax, 0x7fffffff
jmp 0x40542e
mov ecx, 0x16
cmp eax, ecx
cmovb eax, ecx
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00401370
mov edx, dword [ebp - 0x58]
mov esi, eax
mov ecx, dword [ebp - 0x48]
add esp, 8
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x28], esi
push ecx
push eax
push esi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edx
call fcn.00407ae0
mov eax, dword [ebp - 0x48]
mov dword [esi + eax], 0x706d745f
mov byte [esi + edi], 0
cmp dword [ebp - 0x14], 0xf
lea ecx, [ebp - 0x28]
lea eax, [ebp - 0x40]
cmova ecx, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], 0xf
push ecx
cmova eax, dword [ebp - 0x40]
push eax
call fcn.0040c717
add esp, 0x14
mov dword [ebp - 0x1d8], 0x41f3e0
lea ecx, [ebp - 0x168]
call fcn.004018d0
mov eax, dword [ebp - 0x1d8]
xorps xmm0, xmm0
push 0
mov byte [ebp - 4], 3
mov dword [ebp - 0x48], 3
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_istream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1d8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [ebp + ecx - 0x1dc], eax
lea ecx, [ebp - 0x1d8]
mov eax, dword [ebp - 0x1d8]
movlpd qword [ebp - 0x1d0], xmm0
add ecx, dword [eax + 4]
lea eax, [ebp - 0x1c8]
push eax
call fcn.00403af0
mov eax, dword [ebp - 0x1d8]
mov dword [ebp - 4], 5
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1d8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x1dc], eax
lea ecx, [ebp - 0x1c8]
call fcn.00401780
cmp dword [ebp - 0x14], 0xf
lea eax, [ebp - 0x28]
push 0x40
cmova eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x1c8]
push 0x23
push eax
mov byte [ebp - 4], 6
call fcn.00403d60
test eax, eax
mov esi, 4
mov eax, dword [ebp - 0x1d8]
mov ecx, dword [eax + 4]
je 0x405588
xor edx, edx
mov eax, esi
cmp dword [ebp + ecx - 0x1a0], edx
cmovne eax, edx
mov dword [ebp + ecx - 0x1cc], eax
test dword [ebp + ecx - 0x1c8], eax
jne 0x4059f4
jmp 0x4055e8
xor eax, eax
cmp dword [ebp + ecx - 0x1a0], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ebp + ecx - 0x1cc]
and eax, 0x17
mov dword [ebp + ecx - 0x1cc], eax
mov ecx, dword [ebp + ecx - 0x1c8]
and ecx, eax
je 0x4055e8
test cl, 4
je 0x4055c3
mov esi, str.ios_base::badbit_set
jmp 0x4055d3
test cl, 2
mov esi, str.ios_base::failbit_set
mov eax, str.ios_base::eofbit_set
cmove esi, eax
lea eax, [ebp - 0x54]
push 1
push eax
call fcn.00403c70
add esp, 8
push eax
push esi
jmp 0x405a08
push 0
push 3
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x1d8]
call fcn.004041f0
lea ecx, [ebp - 0x4c]
lea eax, [ebp - 0x5c]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405621
test dl, dl
je 0x40561d
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405621
add eax, 2
add ecx, 2
test dl, dl
jne 0x405601
xor eax, eax
jmp 0x405626
sbb eax, eax
or eax, 1
lea ecx, [ebp - 0x1d8]
test eax, eax
jne 0x4058c1
sub esp, 0x18
xorps xmm0, xmm0
mov eax, esp
mov dword [eax], 3
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
movq qword [eax + 0x10], xmm0
call fcn.00404360
lea ecx, [ebp - 0xb8]
mov dword [ebp - 0x120], 0x41f3f0
call fcn.004018d0
mov eax, dword [ebp - 0x120]
push 0
mov byte [ebp - 4], 7
mov dword [ebp - 0x48], 0xb
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x120]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x124], eax
lea ecx, [ebp - 0x120]
mov eax, dword [ebp - 0x120]
add ecx, dword [eax + 4]
lea eax, [ebp - 0x11c]
push eax
call fcn.00403af0
mov eax, dword [ebp - 0x120]
mov dword [ebp - 4], 9
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x120]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x124], eax
lea ecx, [ebp - 0x11c]
call fcn.00401780
cmp dword [ebp - 0x2c], 0xf
lea eax, [ebp - 0x40]
push 0x40
cmova eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x11c]
push 0x22
push eax
mov byte [ebp - 4], 0xa
call fcn.00403d60
test eax, eax
mov eax, dword [ebp - 0x120]
je 0x40578b
mov eax, dword [eax + 4]
xor ecx, ecx
cmp dword [ebp + eax - 0xe8], ecx
cmovne esi, ecx
mov dword [ebp + eax - 0x114], esi
test dword [ebp + eax - 0x110], esi
jne 0x4059f4
nop word [eax + eax]
lea ecx, [ebp - 0x1d8]
call fcn.00403900
cmp eax, 0xffffffff
je 0x405763
mov byte [ebp - 0x41], al
mov eax, dword [ebp - 0x1d8]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x1cc], 6
jne 0x4057d0
push 0
push 1
lea eax, [ebp - 0x41]
push eax
lea ecx, [ebp - 0x120]
call fcn.00404c40
jmp 0x405750
mov ecx, dword [eax + 4]
xor eax, eax
cmp dword [ebp + ecx - 0xe8], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ebp + ecx - 0x114]
and eax, 0x17
mov dword [ebp + ecx - 0x114], eax
mov ecx, dword [ebp + ecx - 0x110]
and ecx, eax
je 0x405750
test cl, 4
je 0x4055c3
mov esi, str.ios_base::badbit_set
jmp 0x4055d3
lea ecx, [ebp - 0x1d8]
call fcn.00403520
lea ecx, [ebp - 0x11c]
call fcn.00403440
test eax, eax
jne 0x405835
mov eax, dword [ebp - 0x120]
mov ecx, dword [eax + 4]
xor eax, eax
cmp dword [ebp + ecx - 0xe8], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ebp + ecx - 0x114]
and eax, 0x17
mov dword [ebp + ecx - 0x114], eax
mov ecx, dword [ebp + ecx - 0x110]
and ecx, eax
je 0x405835
test cl, 4
je 0x4055c3
mov esi, str.ios_base::badbit_set
jmp 0x4055d3
cmp dword [ebp - 0x14], 0xf
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push eax
call fcn.0040c6ad
mov eax, dword [ebp - 0x120]
add esp, 4
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x120]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x124], eax
lea ecx, [ebp - 0x11c]
call fcn.00402120
mov eax, dword [ebp - 0x120]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x120]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x124], eax
lea eax, [ebp - 0xb8]
mov byte [ebp - 4], 0xb
push eax
mov dword [ebp - 0xb8], vtable.std::ios_base.0
call fcn.00406272
add esp, 4
jmp 0x4058e6
call fcn.00403520
cmp dword [ebp - 0x2c], 0xf
lea ecx, [ebp - 0x40]
lea eax, [ebp - 0x28]
cmova ecx, dword [ebp - 0x40]
cmp dword [ebp - 0x14], 0xf
push ecx
cmova eax, dword [ebp - 0x28]
push eax
call fcn.0040c717
add esp, 8
mov eax, dword [ebp - 0x1d8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1d8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x1dc], eax
lea ecx, [ebp - 0x1c8]
call fcn.00402120
mov eax, dword [ebp - 0x1d8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_istream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x1d8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [ebp + ecx - 0x1dc], eax
lea eax, [ebp - 0x168]
mov byte [ebp - 4], 0xc
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00406272
mov ecx, dword [ebp - 0x14]
add esp, 4
cmp ecx, 0xf
jbe 0x405990
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x405986
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405a1e
push ecx
push edx
call fcn.004066f1
add esp, 8
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
cmp ecx, 0xf
jbe 0x4059d2
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4059c8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405a1e
push ecx
push edx
call fcn.004066f1
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00406704
mov esp, ebp
pop ebp
ret
call fcn.004031e0
lea eax, [ebp - 0x54]
push 1
push eax
call fcn.00403c70
add esp, 8
push eax
push str.ios_base::badbit_set
lea ecx, [ebp - 0x70]
call fcn.00401ef0
push 0x427888
lea eax, [ebp - 0x70]
push eax
call fcn.004076be
call fcn.0040b0ff
int3