Function at 0x40ba50
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x492269
mov eax, dword fs:[0]
push eax
sub esp, 0xd8
push ebx
push esi
push edi
mov eax, dword [0x4ae23c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1c], edi
mov eax, dword [edi + 0xc]
mov ebx, dword [eax]
mov dword [ebp - 0x10], ebx
cmp ebx, eax
je 0x40bec8
lea eax, [ebp - 0x7c]
lea ecx, [ebp - 0xd4]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], ecx
jmp 0x40baa4
mov ebx, dword [ebp - 0x10]
mov edx, dword [0x4ae00c]
mov eax, dword [edx + 0xc]
mov ecx, 0x4ae00c
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
push 1
lea ecx, [ebp - 0xe4]
mov dword [ebp - 4], 0
call fcn.0040a770
mov ecx, dword [ebx + 0x10]
cmp byte [ecx + 0x5c], 0
mov byte [ebp - 4], 1
je 0x40bb4f
lea edx, [ecx + 4]
push edx
push ecx
lea ecx, [ebp - 0x2c]
push ecx
call fcn.00408310
add esp, 0xc
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [edi - 0x10]
mov byte [ebp - 4], 2
cmp eax, esi
je 0x40bb47
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40bb3a
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40bb3a
push eax
call fcn.00401460
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40bb2c
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov eax, dword [ebp - 0x2c]
add ebx, 0x10
mov dword [ebp - 0x14], ebx
jmp 0x40bc6e
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x14]
call fcn.004017b0
mov eax, dword [ebp - 0x2c]
jmp 0x40bc6e
mov edx, dword [0x4ae00c]
mov eax, dword [edx + 0xc]
mov ecx, 0x4ae00c
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov ecx, 0x497a2c
mov byte [ebp - 4], 3
test ecx, 0xffff0000
jne 0x40bb96
mov edx, ecx
movzx esi, dx
push 0
push esi
call fcn.00404500
add esp, 8
test eax, eax
je 0x40bba3
push esi
push eax
lea ecx, [ebp - 0x18]
call fcn.00407a60
jmp 0x40bba3
push 0x497a2c
lea ecx, [ebp - 0x18]
call fcn.00407740
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebx + 0x10]
add eax, 4
push eax
push ecx
lea edx, [ebp - 0x28]
push edx
mov byte [ebp - 4], 4
call fcn.00408310
lea ecx, [ebp - 0x18]
push ecx
push eax
lea edx, [ebp - 0x20]
push edx
mov byte [ebp - 4], 5
call fcn.00408310
add esp, 0x18
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [edi - 0x10]
mov byte [ebp - 4], 6
cmp eax, esi
je 0x40bc25
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40bc18
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40bc18
push eax
call fcn.00401460
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40bc10
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [ebp - 0x14], ebx
jmp 0x40bc25
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x14]
call fcn.004017b0
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
mov byte [ebp - 4], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bc48
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bc6b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [ebp - 4], 1
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bc8e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x14]
push 0x40
push 1
push esi
lea ecx, [ebp - 0xd4]
call fcn.004088b0
test eax, eax
jne 0x40bcca
mov ecx, dword [ebp - 0xe4]
mov ecx, dword [ecx + 4]
mov eax, dword [ebp + ecx - 0xd8]
lea ecx, [ebp + ecx - 0xe4]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x40bceb
or eax, 4
jmp 0x40bceb
mov edx, dword [ebp - 0xe4]
mov ecx, dword [edx + 4]
mov eax, dword [ebp + ecx - 0xac]
lea ecx, [ebp + ecx - 0xe4]
neg eax
sbb eax, eax
and eax, 0xfffffffc
add eax, 4
push 0
push eax
call fcn.00405f00
cmp dword [ebp - 0x80], 0
je 0x40bd3a
lea ecx, [ebp - 0xd4]
call fcn.004099a0
test eax, eax
jne 0x40bd33
mov eax, dword [ebp - 0xe4]
mov ecx, dword [eax + 4]
mov eax, dword [ebp + ecx - 0xd8]
lea ecx, [ebp + ecx - 0xe4]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x40bd2b
or eax, 4
push 0
push eax
call fcn.00405f00
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 0xe4]
mov edx, dword [ecx + 4]
mov dword [ebp + edx - 0xe4], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov dword [ebp - 0xd4], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
cmp dword [ebp - 0x80], 0
mov byte [ebp - 4], 8
je 0x40bd94
mov edx, dword [ebp - 0xc4]
lea ecx, [ebp - 0x8c]
cmp dword [edx], ecx
jne 0x40bd94
mov eax, dword [ebp - 0x94]
mov esi, dword [ebp - 0x98]
mov dword [edx], esi
mov edx, dword [ebp - 0xb4]
mov ecx, eax
mov dword [edx], ecx
sub eax, ecx
mov ecx, dword [ebp - 0xa4]
mov dword [ecx], eax
cmp byte [ebp - 0x84], 0
je 0x40bda8
lea ecx, [ebp - 0xd4]
call fcn.004099a0
mov dword [ebp - 0xd4], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x9c]
mov byte [ebp - 4], 9
mov ebx, eax
test eax, eax
je 0x40be0a
mov edi, dword [eax]
test edi, edi
je 0x40be01
push 0
lea ecx, [ebp - 0x24]
call fcn.0045f93f
mov eax, dword [edi + 4]
test eax, eax
je 0x40bde2
cmp eax, 0xffffffff
jae 0x40bde2
dec eax
mov dword [edi + 4], eax
mov esi, dword [edi + 4]
neg esi
sbb esi, esi
lea ecx, [ebp - 0x24]
not esi
call fcn.0045f967
and esi, edi
je 0x40be01
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
push ebx
call fcn.00460f43
add esp, 4
lea ecx, [ebp - 0xd0]
mov byte [ebp - 4], 7
call fcn.0046029d
mov ecx, dword [ebp - 0xe4]
mov edx, dword [ecx + 4]
lea eax, [ebp - 0x7c]
mov dword [ebp + edx - 0xe4], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
push eax
mov byte [ebp - 4], 0
mov dword [ebp - 0x7c], vtable.std::ios_base.0
call fcn.00460133
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40be6a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [ebp - 0x10]
cmp byte [edx + 0x15], 0
jne 0x40beba
mov ecx, dword [edx + 8]
cmp byte [ecx + 0x15], 0
jne 0x40be93
mov eax, dword [ecx]
cmp byte [eax + 0x15], 0
jne 0x40be8e
mov ecx, eax
mov eax, dword [ecx]
cmp byte [eax + 0x15], 0
je 0x40be84
mov dword [ebp - 0x10], ecx
jmp 0x40beb7
mov eax, dword [edx + 4]
cmp byte [eax + 0x15], 0
jne 0x40beb4
jmp 0x40bea3
mov edx, dword [ebp - 0x10]
cmp edx, dword [eax + 8]
jne 0x40beb4
mov dword [ebp - 0x10], eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
je 0x40bea0
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
cmp edx, dword [ecx + 0xc]
jne 0x40baa1
mov edi, ecx
mov edx, dword [edi + 0xc]
mov eax, dword [edx + 4]
push eax
lea ecx, [edi + 8]
call fcn.0040a9d0
mov eax, dword [edi + 0xc]
mov dword [eax + 4], eax
mov eax, dword [edi + 0xc]
mov dword [eax], eax
mov eax, dword [edi + 0xc]
mov dword [eax + 8], eax
xor ebx, ebx
mov dword [edi + 0x10], ebx
mov ecx, dword [edi + 0x18]
mov eax, dword [ecx]
mov dword [ecx], ecx
mov ecx, dword [edi + 0x18]
mov dword [ecx + 4], ecx
mov dword [edi + 0x1c], ebx
cmp eax, dword [edi + 0x18]
je 0x40bf14
mov esi, dword [eax]
push eax
call fcn.00460f43
add esp, 4
mov eax, esi
cmp esi, dword [edi + 0x18]
jne 0x40bf02
mov ecx, dword [edi + 0x24]
mov eax, dword [ecx]
mov dword [ecx], ecx
mov ecx, dword [edi + 0x24]
mov dword [ecx + 4], ecx
mov dword [edi + 0x28], ebx
cmp eax, dword [edi + 0x24]
je 0x40bf42
lea esp, [esp]
mov esi, dword [eax]
push eax
call fcn.00460f43
add esp, 4
mov eax, esi
cmp esi, dword [edi + 0x24]
jne 0x40bf30
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret