Function at 0x402d40
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x41e275
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x74
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov dword [esp + 0x14], 0
mov eax, dword [ebp + 0x98]
test eax, eax
jne 0x402d75
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 cx, word [ebp + 0xa4]
push ecx
push eax
mov ecx, ebp
call fcn.00403b00
cmp eax, 0xffffffff
mov dword [ebp + 0xb4], eax
jne 0x402da7
lea edx, [esp + 0x30]
push 0x422748
push edx
mov dword [esp + 0x38], 0x6a
call sub.MSVCRT.dll__CxxThrowException
mov ecx, ebp
call fcn.00404a50
mov ecx, ebp
call fcn.00403db0
cmp eax, 0xdc
je 0x402dd3
lea eax, [esp + 0x30]
push 0x422748
push eax
mov dword [esp + 0x38], 0x191
call sub.MSVCRT.dll__CxxThrowException
mov ecx, ebp
call fcn.00404f30
mov ecx, dword [ebp + 0xac]
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
push eax
push str.EHLO__s_r_n
push ecx
call ebx
add esp, 0xc
mov ecx, ebp
call fcn.00404cf0
mov ecx, ebp
call fcn.00404a50
mov ecx, ebp
call fcn.00403db0
cmp eax, 0xfa
je 0x402e25
lea edx, [esp + 0x30]
push 0x422748
push edx
mov dword [esp + 0x38], 0x12d
call sub.MSVCRT.dll__CxxThrowException
mov edi, str.AUTH_LOGIN_r_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.00404cf0
mov ecx, ebp
call fcn.00404a50
mov ecx, ebp
call fcn.00403db0
sub eax, 0xfa
je 0x402e52
sub eax, 0x54
je 0x402e83
lea ecx, [esp + 0x30]
push 0x422748
push ecx
mov dword [esp + 0x38], 0x12e
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp + 0x7c]
test ecx, ecx
jne 0x402ea1
lea edx, [esp + 0x30]
push 0x422748
push edx
mov dword [esp + 0x38], 0xcc
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp + 0x78]
test eax, eax
jne 0x402ead
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 ecx
push eax
lea eax, [esp + 0x7c]
push eax
call fcn.00402130
add esp, 0xc
mov eax, dword [esp + 0x78]
mov dword [esp + 0x8c], 0
test eax, eax
jne 0x402ed4
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 ecx, dword [ebp + 0xac]
push eax
push str._s_r_n
push ecx
call ebx
add esp, 0xc
mov ecx, ebp
call fcn.00404cf0
mov ecx, ebp
call fcn.00404a50
mov ecx, ebp
call fcn.00403db0
cmp eax, 0x14e
je 0x402f19
lea edx, [esp + 0x30]
push 0x422748
push edx
mov dword [esp + 0x38], 0x197
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp + 0x8c]
test ecx, ecx
jne 0x402f3a
lea eax, [esp + 0x30]
push 0x422748
push eax
mov dword [esp + 0x38], 0xcd
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp + 0x88]
test eax, eax
jne 0x402f49
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 ecx
lea ecx, [esp + 0x3c]
push eax
push ecx
call fcn.00402130
add esp, 0xc
mov eax, dword [esp + 0x3c]
mov byte [esp + 0x8c], 1
test eax, eax
jne 0x402f6d
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 edx, dword [ebp + 0xac]
push eax
push str._s_r_n
push edx
call ebx
add esp, 0xc
mov ecx, ebp
call fcn.00404cf0
mov ecx, ebp
call fcn.00404a50
mov ecx, ebp
call fcn.00403db0
sub eax, 0xeb
je 0x402fd5
sub eax, 0x63
je 0x402f86
sub eax, 0xc9
je 0x402fbe
lea eax, [esp + 0x30]
push 0x422748
push eax
mov dword [esp + 0x38], 0x197
call sub.MSVCRT.dll__CxxThrowException
lea ecx, [esp + 0x2c]
push 0x422748
push ecx
mov dword [esp + 0x34], 0x196
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp + 0x1c]
test eax, eax
jne 0x402ff3
lea edx, [esp + 0x30]
push 0x422748
push edx
mov dword [esp + 0x38], 0xc9
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp + 0x18]
test eax, eax
jne 0x402fff
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 eax
mov eax, dword [ebp + 0xac]
push str.MAIL_FROM:__s__r_n
push eax
call ebx
add esp, 0xc
mov ecx, ebp
call fcn.00404cf0
mov ecx, ebp
call fcn.00404a50
mov ecx, ebp
call fcn.00403db0
cmp eax, 0xfa
je 0x403044
lea ecx, [esp + 0x30]
push 0x422748
push ecx
mov dword [esp + 0x38], 0x12c
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp + 0xbc]
test eax, eax
je 0x40305b
mov ebx, dword [ebp + 0xc0]
sub ebx, eax
sar ebx, 5
jne 0x403072
lea edx, [esp + 0x30]
push 0x422748
push edx
mov dword [esp + 0x38], 0xcb
call sub.MSVCRT.dll__CxxThrowException
xor esi, esi
xor edi, edi
mov eax, dword [ebp + 0xbc]
test eax, eax
je 0x40312c
mov ecx, dword [ebp + 0xc0]
sub ecx, eax
sar ecx, 5
cmp esi, ecx
jae 0x40312c
test eax, eax
je 0x4030f2
mov edx, dword [ebp + 0xc0]
sub edx, eax
sar edx, 5
cmp edx, esi
jbe 0x4030f2
mov eax, dword [edi + eax + 0x14]
test eax, eax
jne 0x4030b7
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 eax
mov eax, dword [ebp + 0xac]
push str.RCPT_TO:__s__r_n
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
mov ecx, ebp
call fcn.00404cf0
mov ecx, ebp
call fcn.00404a50
mov ecx, ebp
call fcn.00403db0
cmp eax, 0xfa
je 0x4030ec
dec ebx
jmp 0x4030d4
inc esi
add edi, 0x20
jmp 0x403076
lea ecx, [esp + 0x13]
push ecx
push str.invalid_vector_T__subscript
lea ecx, [esp + 0x6c]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
lea edx, [esp + 0x64]
lea ecx, [esp + 0x48]
push edx
mov byte [esp + 0x90], 2
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::out_of_range::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea eax, [esp + 0x48]
push 0x422948
push eax
call sub.MSVCRT.dll__CxxThrowException
test ebx, ebx
ja 0x403147
lea ecx, [esp + 0x30]
push 0x422748
push ecx
mov dword [esp + 0x38], 0x131
call sub.MSVCRT.dll__CxxThrowException
xor esi, esi
xor edi, edi
mov eax, dword [ebp + 0xcc]
test eax, eax
je 0x4031fe
mov edx, dword [ebp + 0xd0]
sub edx, eax
sar edx, 5
cmp esi, edx
jae 0x4031fe
test eax, eax
je 0x4031c4
mov ecx, dword [ebp + 0xd0]
sub ecx, eax
sar ecx, 5
cmp ecx, esi
jbe 0x4031c4
mov eax, dword [edi + eax + 0x14]
test eax, eax
jne 0x40318c
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 edx, dword [ebp + 0xac]
push eax
push str.RCPT_TO:__s__r_n
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
mov ecx, ebp
call fcn.00404cf0
mov ecx, ebp
call fcn.00404a50
mov ecx, ebp
call fcn.00403db0
cmp eax, 0xfa
jne 0x4031a9
inc esi
add edi, 0x20
jmp 0x40314b
lea eax, [esp + 0x13]
lea ecx, [esp + 0x64]
push eax
push str.invalid_vector_T__subscript
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
lea ecx, [esp + 0x64]
mov byte [esp + 0x8c], 3
push ecx
lea ecx, [esp + 0x4c]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::out_of_range::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea edx, [esp + 0x48]
push 0x422948
push edx
call sub.MSVCRT.dll__CxxThrowException
xor esi, esi
xor edi, edi
mov eax, dword [ebp + 0xdc]
test eax, eax
je 0x4032b5
mov ecx, dword [ebp + 0xe0]
sub ecx, eax
sar ecx, 5
cmp esi, ecx
jae 0x4032b5
test eax, eax
je 0x40327b
mov edx, dword [ebp + 0xe0]
sub edx, eax
sar edx, 5
cmp edx, esi
jbe 0x40327b
mov eax, dword [edi + eax + 0x14]
test eax, eax
jne 0x403243
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 eax
mov eax, dword [ebp + 0xac]
push str.RCPT_TO:__s__r_n
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
mov ecx, ebp
call fcn.00404cf0
mov ecx, ebp
call fcn.00404a50
mov ecx, ebp
call fcn.00403db0
cmp eax, 0xfa
jne 0x403260
inc esi
add edi, 0x20
jmp 0x403202
lea ecx, [esp + 0x13]
push ecx
push str.invalid_vector_T__subscript
lea ecx, [esp + 0x6c]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
lea edx, [esp + 0x64]
lea ecx, [esp + 0x48]
push edx
mov byte [esp + 0x90], 4
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::out_of_range::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea eax, [esp + 0x48]
push 0x422948
push eax
call sub.MSVCRT.dll__CxxThrowException
mov edi, str.DATA_r_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
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, ebp
call fcn.00404cf0
mov ecx, ebp
call fcn.00404a50
mov ecx, ebp
call fcn.00403db0
sub eax, 0xfa
je 0x4032e2
sub eax, 0x68
je 0x403313
lea eax, [esp + 0x30]
push 0x422748
push eax
mov dword [esp + 0x38], 0x12f
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp + 0xac]
push ecx
mov ecx, ebp
call fcn.00403de0
mov ecx, ebp
call fcn.00404cf0
mov ecx, ebp
call fcn.00404fb0
test eax, eax
je 0x403375
mov ecx, ebp
xor esi, esi
call fcn.00404fb0
test eax, eax
jbe 0x403396
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
push esi
mov ecx, ebp
call fcn.00404f40
mov edx, dword [ebp + 0xac]
push eax
push str._s_r_n
push edx
call edi
add esp, 0xc
mov ecx, ebp
call fcn.00404cf0
mov ecx, ebp
inc esi
call fcn.00404fb0
cmp esi, eax
jb 0x403346
jmp 0x403396
mov eax, dword [ebp + 0xac]
push 0x4272b0
push str._s_r_n
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
mov ecx, ebp
call fcn.00404cf0
push 0x37
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
jne 0x4033bf
lea ecx, [esp + 0x30]
push 0x422748
push ecx
mov dword [esp + 0x38], 0x198
call sub.MSVCRT.dll__CxxThrowException
push 0xff
call sub.MFC42.DLL_operatornew
mov ebx, eax
xor eax, eax
add esp, 4
cmp ebx, eax
mov dword [esp + 0x24], ebx
jne 0x4033ef
lea edx, [esp + 0x30]
push 0x422748
push edx
mov dword [esp + 0x38], 0x198
call sub.MSVCRT.dll__CxxThrowException
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xec]
test eax, eax
je 0x40397c
mov ecx, dword [ebp + 0xf0]
sub ecx, eax
mov eax, dword [esp + 0x20]
sar ecx, 4
cmp eax, ecx
jae 0x40397c
mov eax, dword [ebp + 0xec]
mov edx, dword [esp + 0x18]
mov edi, dword [edx + eax + 4]
test edi, edi
jne 0x403438
mov edi, 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]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.__MESSAGE__ID__54yg6f6h6y456345
mov eax, ecx
mov esi, edi
mov edi, ebx
push str.___s_r_n
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0xac]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov edi, str.Content_Type:_application_x_msdownload__name_
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edi, 0x427274
or ecx, 0xffffffff
mov edx, dword [ebp + 0xec]
mov esi, dword [eax]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
je 0x403516
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + edx + 8]
test eax, eax
jbe 0x403516
cmp esi, eax
jb 0x4034d0
lea esi, [eax - 1]
mov eax, dword [esp + 0x18]
push edi
mov ecx, dword [eax + edx + 4]
lea ebx, [eax + edx + 4]
add esi, ecx
movsx ecx, byte [esi]
push ecx
push 0x427274
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
jne 0x403512
cmp esi, dword [ebx]
je 0x403516
movsx edx, byte [esi - 1]
dec esi
push edi
push edx
push 0x427274
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
je 0x4034f5
sub esi, dword [ebx]
jmp 0x40351d
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov esi, dword [eax]
mov ecx, dword [esp + 0x24]
xor eax, eax
lea edi, [ecx + esi + 1]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, 0x427270
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.Content_Transfer_Encoding:_base64_r_n
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.Content_Disposition:_attachment__filename_
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edi, 0x427274
or ecx, 0xffffffff
mov edx, dword [ebp + 0xec]
mov esi, dword [eax]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
je 0x40364b
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + edx + 8]
test eax, eax
jbe 0x40364b
cmp esi, eax
jb 0x403605
lea esi, [eax - 1]
mov eax, dword [esp + 0x18]
push edi
mov ecx, dword [eax + edx + 4]
lea ebx, [eax + edx + 4]
add esi, ecx
movsx ecx, byte [esi]
push ecx
push 0x427274
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
jne 0x403647
cmp esi, dword [ebx]
je 0x40364b
movsx edx, byte [esi - 1]
dec esi
push edi
push edx
push 0x427274
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
je 0x40362a
sub esi, dword [ebx]
jmp 0x403652
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov esi, dword [eax]
mov ebx, dword [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
lea edi, [ebx + esi + 1]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x427270
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x42721c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
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, ebp
call fcn.00404cf0
push 0x427218
push ebx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
je 0x40394e
mov edi, eax
xor esi, esi
test byte [edi + 0xc], 0x10
jne 0x403725
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [esp + 0x28]
push edi
push 0x36
push 1
push eax
call ebx
add esi, eax
mov al, byte [edi + 0xc]
add esp, 0x10
test al, 0x10
je 0x40370d
mov eax, dword [esp + 0x2c]
add eax, esi
mov dword [esp + 0x2c], eax
and eax, 0xfffffc00
cmp eax, 0x500000
ja 0x403965
push 0
push 0
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
mov eax, 0x2f684bdb
add esp, 0xc
mul esi
sub esi, edx
xor ebx, ebx
shr esi, 1
add esi, edx
shr esi, 5
inc esi
test esi, esi
jbe 0x403927
mov dword [esp + 0x30], esi
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x28]
push ecx
push 0x36
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
mov dword [esp + 0x34], eax
test ebx, ebx
push eax
push esi
je 0x4037d2
lea edx, [esp + 0x6c]
push edx
call fcn.00402130
mov edx, dword [esp + 0x20]
add esp, 0xc
or edx, 1
mov dword [esp + 0x14], edx
mov eax, dword [eax + 4]
test eax, eax
jne 0x4037b1
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 edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
jmp 0x40380d
lea eax, [esp + 0x50]
push eax
call fcn.00402130
mov edx, dword [esp + 0x20]
mov eax, dword [eax + 4]
add esp, 0xc
or edx, 2
test eax, eax
mov dword [esp + 0x14], edx
jne 0x4037f6
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 edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov al, byte [esp + 0x14]
mov ecx, edx
and ecx, 3
test al, 2
rep movsb byte es:[edi], byte [esi]
je 0x40386f
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x4c]
and edx, 0xfffffffd
mov dword [esp + 0x14], edx
xor edx, edx
cmp eax, edx
je 0x403861
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x403856
cmp al, 0xff
je 0x403856
dec al
mov byte [ecx], al
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], edx
jmp 0x403871
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
xor edx, edx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], edx
jmp 0x403871
xor edx, edx
mov al, byte [esp + 0x14]
mov dword [esp + 0x8c], 1
test al, 1
je 0x4038c2
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x68]
and esi, 0xfffffffe
cmp eax, edx
mov dword [esp + 0x14], esi
je 0x4038b6
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x4038ab
cmp al, 0xff
je 0x4038ab
dec al
mov byte [ecx], al
jmp 0x4038b6
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
xor edx, edx
mov dword [esp + 0x68], edx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x70], edx
mov edi, 0x42721c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x34]
mov ecx, edx
and ecx, 3
lea ebx, [ebx + eax + 2]
cmp ebx, 0x1400
rep movsb byte es:[edi], byte [esi]
jb 0x403909
mov ecx, ebp
xor ebx, ebx
call fcn.00404cf0
mov eax, dword [esp + 0x30]
dec eax
mov dword [esp + 0x30], eax
jne 0x40376c
test ebx, ebx
je 0x403923
mov ecx, ebp
call fcn.00404cf0
mov edi, dword [esp + 0x1c]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x28]
add esp, 4
inc ecx
add eax, 0x10
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], eax
jmp 0x4033fb
lea ecx, [esp + 0x34]
push 0x422748
push ecx
mov dword [esp + 0x3c], 0x194
call sub.MSVCRT.dll__CxxThrowException
lea edx, [esp + 0x34]
push 0x422748
push edx
mov dword [esp + 0x3c], 0x195
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [esp + 0x28]
push eax
call sub.MFC42.DLL_operatordelete
push ebx
call sub.MFC42.DLL_operatordelete
mov eax, dword [ebp + 0xec]
add esp, 8
test eax, eax
je 0x4039ca
mov ecx, dword [ebp + 0xf0]
sub ecx, eax
test ecx, 0xfffffff0
je 0x4039ca
mov edx, dword [ebp + 0xac]
push str.__MESSAGE__ID__54yg6f6h6y456345
push str._r_n___s___r_n
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
mov ecx, ebp
call fcn.00404cf0
mov edi, str._r_n._r_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.00404cf0
mov ecx, ebp
call fcn.00404a50
mov ecx, ebp
call fcn.00403db0
cmp eax, 0xfa
je 0x403a23
lea ecx, [esp + 0x34]
push 0x422748
push ecx
mov dword [esp + 0x3c], 0x132
call sub.MSVCRT.dll__CxxThrowException
mov edi, str.QUIT_r_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [ebp + 0xac]
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, ebp
call fcn.00404cf0
mov ecx, ebp
call fcn.00404a50
mov ecx, ebp
call fcn.00403db0
cmp eax, 0xdd
je 0x403a7c
lea eax, [esp + 0x34]
push 0x422748
push eax
mov dword [esp + 0x3c], 0x130
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp + 0xb4]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0x3c]
xor esi, esi
cmp ecx, esi
mov dword [ebp + 0xb4], esi
je 0x403ab5
mov al, byte [ecx - 1]
test al, al
je 0x403aab
cmp al, 0xff
je 0x403aab
dec al
mov byte [ecx - 1], al
jmp 0x403ab5
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x3c], esi
cmp ecx, esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
je 0x403ae5
mov al, byte [ecx - 1]
test al, al
je 0x403adb
cmp al, 0xff
je 0x403adb
dec al
mov byte [ecx - 1], al
jmp 0x403ae5
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x84]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x80
ret