Function at 0x409c90
Capabilities:
Delete file
Move file

Disassembly:
push 0xffffffffffffffff
push 0x50e44f
mov eax, dword fs:[0]
push eax
sub esp, 0xf4
mov eax, dword [0x564020]
xor eax, esp
mov dword [esp + 0xf0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x564020]
xor eax, esp
push eax
lea eax, [esp + 0x108]
mov dword fs:[0], eax
mov ebx, ecx
cmp byte [ebx + 0x144], 0
mov dword [esp + 0x18], ebx
je 0x40a0d8
lea ecx, [ebx + 0x90]
lea esi, [esp + 0xe8]
call fcn.0040bfb0
push 1
lea ecx, [esp + 0x60]
mov dword [esp + 0x114], 0
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ofstream_char__struct_std::char_traits_char__::constructor_void_]
mov byte [esp + 0x110], 1
cmp dword [esp + 0x100], 8
mov eax, dword [esp + 0xec]
jae 0x409d27
lea eax, [esp + 0xec]
push 0x40
push 0x22
push eax
lea ecx, [esp + 0x68]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ofstream_char__struct_std::char_traits_char__::open_wchar_t_const___int__int_]
cmp dword [esp + 0xac], 0
setne al
mov byte [esp + 0x17], al
test al, al
je 0x40a0ae
lea ebp, [ebx + 0x10]
mov edi, ebp
call fcn.00409920
mov edi, eax
lea eax, [esp + 0x2c]
push eax
call fcn.00411dc0
lea ecx, [edi + 0x18]
push ecx
lea eax, [esp + 0x30]
mov byte [esp + 0x114], 2
call fcn.0040aa40
lea esi, [esp + 0x2c]
call fcn.004090c0
test al, al
je 0x40a072
mov edx, esi
push ebp
push edx
mov eax, 0x10
call fcn.00409530
add esp, 8
test al, al
je 0x40a072
mov ebx, dword [esp + 0x18]
lea eax, [edi + 0x10]
add ebx, 0x28
call fcn.004096f0
test al, al
je 0x40a072
lea ecx, [esp + 0x5c]
mov edx, esi
call fcn.00408eb0
mov ecx, dword [ebp + 0x10]
test al, al
setne byte [esp + 0x16]
sub ecx, dword [ebp + 0xc]
mov eax, 0x78787879
imul ecx
sar edx, 5
mov edi, edx
shr edi, 0x1f
add edi, edx
push ebp
mov dword [esp + 0x2c], edi
call fcn.004099a0
mov esi, eax
add esp, 4
lea eax, [esp + 0x44]
push eax
call fcn.00411dc0
push esi
lea esi, [esp + 0x48]
mov byte [esp + 0x114], 3
call fcn.0040a400
xor ebx, ebx
mov dword [esp + 0x20], ebx
cmp edi, ebx
jbe 0x409f35
mov dword [esp + 0x24], ebx
mov esi, dword [esp + 0x18]
mov ecx, dword [esi + 0x70]
sub ecx, dword [esi + 0x6c]
sar ecx, 2
cmp ebx, ecx
jb 0x409e36
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edx, dword [esi + 0x6c]
lea eax, [edx + ebx*4]
mov eax, dword [eax]
test eax, eax
jne 0x409ed2
cmp dword [esi + 0x104], eax
je 0x409ef3
lea eax, [esi + 0xac]
mov dword [esp + 0x1c], eax
mov eax, dword [eax]
mov ecx, dword [eax + 4]
cmp dword [ecx + esi + 0xb4], 0
jne 0x409ef3
mov edi, dword [esp + 0x20]
add esi, 0x40
call fcn.0040a4f0
mov esi, eax
mov eax, dword [esi + 4]
push eax
lea eax, [esp + 0x48]
call fcn.0040aa40
cmp byte [esp + 0x16], 0
je 0x409ec8
mov edx, dword [esi]
mov ecx, dword [esp + 0x1c]
push edx
lea edx, [esp + 0x48]
call fcn.00408db0
add esp, 4
test al, al
je 0x409ec8
lea ecx, [esp + 0x5c]
lea edx, [esp + 0x44]
call fcn.00408eb0
test al, al
je 0x409ec8
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
mov byte [esp + 0x16], 1
jmp 0x409ef3
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
jmp 0x409eee
cmp byte [esp + 0x16], 0
je 0x409eee
lea edx, [eax + 8]
lea ecx, [esp + 0x5c]
call fcn.00408eb0
mov byte [esp + 0x16], 1
test al, al
jne 0x409ef3
mov byte [esp + 0x16], 0
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0xc]
mov eax, 0x78787879
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x409f14
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov eax, dword [ebp + 0xc]
add eax, dword [esp + 0x24]
cmp byte [eax + 0x41], 0
je 0x409f25
inc dword [esp + 0x20]
add dword [esp + 0x24], 0x44
inc ebx
cmp ebx, edi
jb 0x409e1f
jmp 0x409f39
mov esi, dword [esp + 0x18]
cmp byte [esp + 0x16], 0
je 0x40a060
lea ecx, [esp + 0x5c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ofstream_char__struct_std::char_traits_char__::close_void_]
lea ebx, [esi + 0xac]
mov ecx, ebx
mov dword [esp + 0x1c], ebx
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_fstream_char__struct_std::char_traits_char__::close_void_]
cmp dword [esi + 0xa8], 8
jb 0x409f71
mov eax, dword [esi + 0x94]
jmp 0x409f77
lea eax, [esi + 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40a032
mov ecx, 8
cmp dword [esi + 0xa8], ecx
jb 0x409f9b
mov eax, dword [esi + 0x94]
jmp 0x409fa1
lea eax, [esi + 0x94]
cmp dword [esp + 0x100], ecx
mov ecx, dword [esp + 0xec]
jae 0x409fb8
lea ecx, [esp + 0xec]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40a032
xor esi, esi
test edi, edi
jbe 0x40a001
xor ebx, ebx
lea esp, [esp]
mov ecx, dword [ebp + 0x10]
sub ecx, dword [ebp + 0xc]
mov eax, 0x78787879
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp esi, ecx
jb 0x409ff1
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edx, dword [ebp + 0xc]
mov byte [ebx + edx + 0x41], 1
inc esi
add ebx, 0x44
cmp esi, edi
jb 0x409fd0
mov edi, dword [esp + 0x18]
lea eax, [edi + 0x30]
call fcn.0040bea0
mov ebx, edi
call fcn.0040a110
push ebp
lea eax, [ebx + 0x78]
call fcn.00409740
add esp, 4
xor al, al
mov byte [ebx + 0x144], al
mov ebx, dword [esp + 0x1c]
mov byte [esp + 0x17], al
mov esi, edi
mov eax, dword [esi + 0x140]
and eax, 6
or eax, 0x48
lea ecx, [esi + 0x90]
shr eax, 1
cmp dword [ecx + 0x18], 8
jb 0x40a051
mov ecx, dword [ecx + 4]
jmp 0x40a054
add ecx, 4
push 0x40
push eax
push ecx
mov ecx, ebx
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_fstream_char__struct_std::char_traits_char__::open_wchar_t_const___int__int_]
lea eax, [esp + 0x44]
push eax
mov byte [esp + 0x114], 2
call fcn.004023d0
lea ecx, [esp + 0x2c]
push ecx
mov byte [esp + 0x114], 1
call fcn.004023d0
cmp byte [esp + 0x17], 0
je 0x40a0aa
cmp dword [esp + 0x100], 8
mov eax, dword [esp + 0xec]
jae 0x40a0a3
lea eax, [esp + 0xec]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, dword [esp + 0x18]
lea ecx, [esp + 0x5c]
mov byte [esp + 0x110], 0
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_ofstream_char__struct_std::char_traits_char__::vbase_dtor_void_]
lea ecx, [esp + 0xe8]
mov dword [esp + 0x110], 0xffffffff
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
xor eax, eax
cmp byte [ebx + 0x144], al
sete al
mov ecx, dword [esp + 0x108]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xf0]
xor ecx, esp
call fcn.00419fc4
add esp, 0x100
ret