Function at 0x4031c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42ae00
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xec
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], esi
mov eax, dword [esi + 0x10]
test eax, eax
je 0x4031f5
call fcn.00403690
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 0
mov eax, dword [eax + 4]
test eax, eax
jne 0x40320b
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 0
push 0x80
push 3
push 0
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x20], edi
jne 0x403243
lea ecx, [ebp - 0x64]
push 0x42f338
push ecx
mov dword [ebp - 0x64], str.open_file_error_n
call sub.MSVCRT.dll__CxxThrowException
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [ebp - 0x14]
push 0
push edx
lea eax, [ebp - 0x40]
push 4
push eax
push edi
call ebx
test eax, eax
jne 0x403271
lea ecx, [ebp - 0x70]
push 0x42f338
push ecx
mov dword [ebp - 0x70], str.read_error_n
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0x14], 4
jae 0x40328c
lea edx, [ebp - 0x6c]
push 0x42f338
push edx
mov dword [ebp - 0x6c], str.read_error_n
call sub.MSVCRT.dll__CxxThrowException
lea eax, [ebp - 0x14]
push 0
push eax
add esi, 0x14
push 4
push esi
push edi
call ebx
test eax, eax
jne 0x4032b4
lea ecx, [ebp - 0x48]
push 0x42f338
push ecx
mov dword [ebp - 0x48], str.read_error_n
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0x14], 4
jae 0x4032cf
lea edx, [ebp - 0x60]
push 0x42f338
push edx
mov dword [ebp - 0x60], str.read_error_n
call sub.MSVCRT.dll__CxxThrowException
lea eax, [ebp - 0x14]
push 0
push eax
lea ecx, [ebp - 0x90]
push 0x10
push ecx
push edi
call ebx
test eax, eax
jne 0x4032fa
lea edx, [ebp - 0x68]
push 0x42f338
push edx
mov dword [ebp - 0x68], str.read_error_n
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0x14], 0x10
jae 0x403315
lea eax, [ebp - 0x54]
push 0x42f338
push eax
mov dword [ebp - 0x54], str.read_error_n
call sub.MSVCRT.dll__CxxThrowException
lea ecx, [ebp - 0xf8]
call fcn.004138b0
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x40]
cmp ecx, eax
jae 0x4034af
lea edx, [ebp - 0x14]
push 0
push edx
lea eax, [ebp - 0x34]
push 4
push eax
push edi
call ebx
test eax, eax
jne 0x40335d
lea ecx, [ebp - 0x5c]
push 0x42f338
push ecx
mov dword [ebp - 0x5c], str.read_error_n
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0x14], 4
jae 0x403378
lea edx, [ebp - 0x4c]
push 0x42f338
push edx
mov dword [ebp - 0x4c], str.read_error_n
call sub.MSVCRT.dll__CxxThrowException
lea eax, [ebp - 0x34]
push 4
push eax
lea ecx, [ebp - 0xf8]
call fcn.004138e0
push 0x18
call sub.MFC42.DLL_operatornew
add esp, 4
lea ecx, [ebp - 0x14]
mov esi, eax
push 0
push ecx
push 0x15
push esi
push edi
call ebx
test eax, eax
jne 0x4033ba
lea edx, [ebp - 0x50]
push 0x42f338
push edx
mov dword [ebp - 0x50], str.read_error_n
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0x14], 0x15
jae 0x4033d5
lea eax, [ebp - 0x58]
push 0x42f338
push eax
mov dword [ebp - 0x58], str.read_error_n
call sub.MSVCRT.dll__CxxThrowException
push 0x15
push esi
lea ecx, [ebp - 0xf8]
call fcn.004138e0
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], esi
mov edi, dword [edx + 8]
lea ebx, [edx + 4]
mov edx, dword [0x43648c]
mov al, 1
mov esi, dword [edi + 4]
cmp esi, edx
je 0x40341b
mov eax, dword [esi + 0xc]
mov edi, esi
cmp ecx, eax
setb al
test al, al
je 0x403416
mov esi, dword [esi]
jmp 0x403400
mov esi, dword [esi + 8]
jmp 0x403400
mov dl, byte [ebx + 8]
test dl, dl
je 0x40342d
lea eax, [ebp - 0x3c]
lea ecx, [ebp - 0x74]
push eax
push edi
push esi
jmp 0x403444
test al, al
mov dword [ebp - 0x28], edi
je 0x403462
mov eax, dword [ebx + 4]
cmp edi, dword [eax]
jne 0x403457
lea eax, [ebp - 0x3c]
lea ecx, [ebp - 0x7c]
push eax
push edi
push esi
push ecx
mov ecx, ebx
call fcn.004058e0
mov edx, dword [eax]
mov byte [ebp - 0x2c], 1
mov dword [ebp - 0x30], edx
jmp 0x40349a
lea ecx, [ebp - 0x28]
call fcn.004062f0
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x28]
cmp dword [eax + 0xc], ecx
jae 0x403486
lea ecx, [ebp - 0x3c]
lea edx, [ebp - 0x78]
push ecx
push edi
push esi
push edx
mov ecx, ebx
call fcn.004058e0
mov eax, dword [eax]
mov byte [ebp - 0x2c], 1
mov dword [ebp - 0x30], eax
jmp 0x40349a
lea ecx, [ebp - 0x15]
lea edx, [ebp - 0x28]
push ecx
push edx
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x15], 0
call fcn.0041e3b0
mov eax, dword [ebp - 0x24]
mov edi, dword [ebp - 0x20]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
inc eax
mov dword [ebp - 0x24], eax
jmp 0x403327
lea eax, [ebp - 0xa0]
lea ecx, [ebp - 0xf8]
push eax
call fcn.00413990
mov ecx, 4
lea edi, [ebp - 0x90]
lea esi, [ebp - 0xa0]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
mov ecx, dword [ebp - 0x1c]
je 0x4034f5
call fcn.00403690
lea eax, [ebp - 0x44]
push 0x42f338
push eax
mov dword [ebp - 0x44], str.file_Md5_error_n
call sub.MSVCRT.dll__CxxThrowException
mov esi, dword [ebp + 8]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea ebx, [ecx + 0x18]
mov ecx, dword [esi + 8]
mov eax, dword [edx]
mov edi, ecx
cmp eax, edi
mov dword [ebp + 8], edi
jae 0x403514
mov edi, eax
mov dword [ebp + 8], edi
cmp ebx, esi
jne 0x4035a0
mov esi, eax
mov eax, dword [ebx + 8]
cmp eax, edi
jae 0x40352b
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xran_void_]
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Split_void_]
mov eax, dword [ebx + 8]
sub eax, edi
cmp eax, esi
jae 0x40353e
mov esi, eax
test esi, esi
jbe 0x403575
mov ecx, dword [ebx + 4]
sub eax, esi
add ecx, edi
push eax
lea edx, [ecx + esi]
push edx
push ecx
call dword [sym.imp.MSVCRT.dll_memmove]
mov edi, dword [ebx + 8]
add esp, 0xc
sub edi, esi
mov ecx, ebx
push 0
push edi
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 0x403575
push edi
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
push 0
push 0
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::erase_unsigned_int__unsigned_int_]
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
test edi, edi
jbe 0x403606
cmp edi, ecx
jne 0x403606
mov eax, dword [esi + 4]
test eax, eax
jne 0x4035b4
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]
cmp byte [eax - 1], 0xfe
jae 0x403606
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [esi + 4]
test eax, eax
jne 0x4035d0
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]
mov dword [ebx + 4], eax
mov edx, dword [esi + 8]
mov dword [ebx + 8], edx
mov ecx, dword [esi + 0xc]
mov edx, dword [ebp - 0x20]
mov dword [ebx + 0xc], ecx
mov cl, byte [eax - 1]
push edx
inc cl
mov byte [eax - 1], cl
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 1
push edi
mov ecx, 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 0x403642
mov esi, dword [esi + 4]
test esi, esi
jne 0x403622
mov esi, 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]
mov eax, dword [ebp + 8]
mov edi, dword [ebx + 4]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 4]
mov dword [ebx + 8], eax
mov byte [ecx + eax], 0
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4