Function at 0x40bcd0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x422829
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push esi
mov esi, ecx
push edi
xor edi, edi
cmp dword [esi + 0x98], edi
jne 0x40bcfb
call fcn.0040beb0
add esi, 0x90
push str.cookie.info
lea eax, [esp + 0x18]
push esi
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0xc
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], edi
push ecx
call fcn.0041ca00
test al, al
je 0x40bd55
mov eax, dword [esp + 0x18]
cmp eax, edi
jne 0x40bd33
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x10], esi
jne 0x40bda1
mov ecx, dword [esp + 0x18]
cmp ecx, edi
je 0x40bd8c
mov al, byte [ecx - 1]
test al, al
je 0x40bd82
cmp al, 0xff
je 0x40bd82
dec al
pop edi
mov byte [ecx - 1], al
xor al, al
pop esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 4
dec ecx
push ecx
call fcn.004218a8
add esp, 4
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 4
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x10]
push edi
push edx
lea eax, [esp + 0x14]
push 4
push eax
push esi
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], edi
call ebx
mov eax, dword [esp + 0xc]
cmp eax, edi
jbe 0x40be54
inc eax
push ebp
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x14]
add esp, 4
inc ecx
mov ebp, eax
mov edx, ecx
xor eax, eax
mov edi, ebp
push 0
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push ecx
push ebp
push esi
call ebx
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x40]
not ecx
dec ecx
mov ebx, ecx
mov ecx, edi
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x40be48
mov edi, dword [edi + 4]
mov ecx, ebx
mov edx, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x3c]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x18]
mov dword [eax + 8], ebx
mov eax, dword [eax + 4]
mov byte [ebx + eax], 0
push ebp
call fcn.004218a8
add esp, 4
xor edi, edi
pop ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x1c]
pop ebx
cmp ecx, edi
je 0x40be80
mov al, byte [ecx - 1]
test al, al
je 0x40be76
cmp al, 0xff
je 0x40be76
dec al
mov byte [ecx - 1], al
jmp 0x40be80
dec ecx
push ecx
call fcn.004218a8
add esp, 4
mov ecx, dword [esp + 0x24]
pop edi
mov al, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x28
ret 4