Function at 0x405050
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x8038
call fcn.00421800
mov eax, dword [0x45f91c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x8008], ebx
mov dword [ebp - 0x8038], esi
mov dword [ebp - 0x8024], esi
call fcn.004036a0
add esp, 4
test eax, eax
jns 0x4050fb
mov eax, dword [ebp - 0x8030]
sub esp, 0x10
mov dword [ebp - 0x8008], eax
lea eax, [ebp - 0x800c]
mov dword [ebp - 0x802c], eax
mov eax, esp
mov dword [ebp - 0x800c], esi
push str.got_bad_character_name___
mov dword [ebp - 0x8034], 0xa
mov dword [ebp - 0x8030], 0
movups xmm0, xmmword [ebp - 0x8034]
push str.pvpgn::d2cs::d2charinfo_load
push 0x10
movups xmmword [eax], xmm0
call fcn.00415770
add esp, 0x1c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004217ea
mov esp, ebp
pop ebp
ret
push ebx
call fcn.00403630
add esp, 4
test eax, eax
jns 0x405132
mov eax, dword [ebp - 0x8030]
sub esp, 0x10
mov dword [ebp - 0x8008], eax
lea eax, [ebp - 0x800c]
mov dword [ebp - 0x802c], eax
mov eax, esp
mov dword [ebp - 0x800c], ebx
push str.got_bad_account_name___
jmp 0x4050ba
call fcn.0040f7e0
mov edx, eax
lea eax, [edx + 1]
nop dword [eax]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x405140
mov ecx, ebx
sub edx, eax
lea eax, [ecx + 1]
mov dword [ebp - 0x8018], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405154
sub ecx, dword [ebp - 0x8018]
lea eax, [esi + 1]
mov dword [ebp - 0x8018], eax
nop word [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x405170
sub esi, dword [ebp - 0x8018]
add edx, 3
push 0x1f8
push str.C:_builder_source_srcd2csd2charfile.cpp
lea eax, [esi + ecx]
add eax, edx
push eax
call fcn.00418700
push dword [ebp - 0x8038]
mov esi, eax
push ebx
push esi
mov dword [ebp - 0x8020], esi
call fcn.004049f0
lea eax, [ebp - 0x8018]
mov dword [ebp - 0x8018], 0xc0
push eax
push edi
push esi
call fcn.00405780
add esp, 0x24
test eax, eax
jns 0x4051f6
lea eax, [ebp - 0x8020]
push eax
push str.error_loading_character_file_
push str.pvpgn::d2cs::d2charinfo_load
push 0x10
call fcn.00401760
push 0x1fd
push str.C:_builder_source_srcd2csd2charfile.cpp
push esi
call fcn.00418690
jmp 0x4050e4
mov ecx, dword [ebp - 0x8018]
cmp ecx, 0xc0
je 0x405299
mov eax, dword [ebp - 0x8038]
sub esp, 0x10
mov dword [ebp - 0x8034], eax
mov eax, dword [ebp - 0x8030]
mov dword [ebp - 0x8030], eax
mov eax, dword [ebp - 0x8030]
mov dword [ebp - 0x8028], eax
lea eax, [ebp - 0x8034]
mov dword [ebp - 0x800c], eax
mov eax, esp
push str.got_bad_charinfo_file___length__
mov dword [ebp - 0x8014], 0x2a
mov dword [ebp - 0x8010], 0
movups xmm0, xmmword [ebp - 0x8014]
push str.pvpgn::d2cs::d2charinfo_load
push 0x10
mov dword [ebp - 0x802c], ecx
movups xmmword [eax], xmm0
call fcn.00415770
push 0x202
push str.C:_builder_source_srcd2csd2charfile.cpp
push esi
call fcn.00418690
add esp, 0x28
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004217ea
mov esp, ebp
pop ebp
ret
xor eax, eax
nop dword [eax + eax]
cmp byte [eax + edi + 0x70], 0
jne 0x4052ac
mov byte [eax + edi + 0x70], 0xff
inc eax
cmp eax, 0x22
jb 0x4052a0
mov byte [eax + edi + 0x6f], 0
test edi, edi
jne 0x405302
sub esp, 0x10
lea eax, [ebp - 0x802c]
xorps xmm0, xmm0
mov dword [ebp - 0x800c], eax
mov eax, esp
movq qword [ebp - 0x802c], xmm0
movlpd qword [ebp - 0x8014], xmm0
movups xmm0, xmmword [ebp - 0x8014]
push str.got_NULL_data
push str.pvpgn::d2cs::d2charinfo_check
push 0x10
movups xmmword [eax], xmm0
call fcn.00415770
add esp, 0x1c
jmp 0x4053a9
push edi
call fcn.0041c690
add esp, 4
cmp eax, 0x12345678
je 0x40536f
push edi
call fcn.0041c690
mov dword [ebp - 0x801c], eax
sub esp, 0xc
mov eax, dword [ebp - 0x8030]
mov dword [ebp - 0x8018], eax
lea eax, [ebp - 0x801c]
mov dword [ebp - 0x800c], eax
mov eax, esp
push str.info_data_check_failed__header_0x:08X_
mov dword [ebp - 0x8014], 3
mov dword [ebp - 0x8010], 0
movups xmm0, xmmword [ebp - 0x8014]
push str.pvpgn::d2cs::d2charinfo_check
push 0x10
movups xmmword [eax], xmm0
call fcn.00415770
add esp, 0x1c
jmp 0x4053a9
lea ebx, [edi + 4]
push ebx
call fcn.0041c690
add esp, 4
cmp eax, 0x10000
je 0x4053d0
push ebx
call fcn.0041c690
mov dword [ebp - 0x8008], eax
lea eax, [ebp - 0x8008]
push eax
push str.info_data_check_failed__version_0x:08X_
push str.pvpgn::d2cs::d2charinfo_check
push 0x10
call fcn.00401630
add esp, 0x14
push 0x207
push str.C:_builder_source_srcd2csd2charfile.cpp
push esi
call fcn.00418690
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004217ea
mov esp, ebp
pop ebp
ret
lea eax, [edi + 0xb4]
push eax
call fcn.0041c690
add esp, 4
test al, 0x40
jne 0x4053fe
lea eax, [edi + 0x8e]
push 0xff
push eax
call fcn.0041c630
push 0x20c
jmp 0x40575a
call fcn.0040f960
mov ebx, eax
test ebx, ebx
je 0x405747
lea ecx, [edi + 8]
push ecx
call fcn.0041c690
add esp, 4
cmp eax, ebx
jae 0x405747
lea eax, [ebp - 0x8008]
push eax
lea eax, [ebp - 0x8024]
push eax
push str.___was_created_in_old_ladder_season__set_to_non_ladder
push str.pvpgn::d2cs::d2charinfo_load
push 4
call fcn.004035d0
push 0x448720
push esi
call fcn.0042ba70
mov ebx, eax
add esp, 0x1c
test ebx, ebx
jne 0x405499
lea eax, [ebp - 0x8008]
push eax
lea eax, [ebp - 0x8020]
push eax
push str.charinfo_file____does_not_exist_for_account___
push str.pvpgn::d2cs::d2charinfo_load
push 0x10
call fcn.004035d0
push 0x21d
push str.C:_builder_source_srcd2csd2charfile.cpp
push esi
call fcn.00418690
add esp, 0x20
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004217ea
mov esp, ebp
pop ebp
ret
push 0x220
push str.C:_builder_source_srcd2csd2charfile.cpp
push esi
call fcn.00418690
lea esi, [edi + 0xb4]
push esi
call fcn.0041c690
and eax, 0xffffffbf
push eax
push esi
call fcn.0041c770
lea esi, [edi + 0x8a]
push esi
call fcn.0041c5e0
and al, 0xbf
mov byte [ebp - 0x8018], al
push dword [ebp - 0x8018]
push esi
call fcn.0041c630
lea eax, [edi + 0x8e]
push 0xff
push eax
call fcn.0041c630
push ebx
push 0xc0
push 1
push edi
call fcn.0042c7f8
add esp, 0x3c
cmp eax, 0xc0
je 0x405555
call fcn.0042b896
push dword [eax]
call fcn.0042ca0c
mov dword [ebp - 0x8008], eax
lea eax, [ebp - 0x8008]
push eax
lea eax, [ebp - 0x8024]
push eax
push str.error_writing_charinfo_file_for_character_____std::fwrite:__
push str.pvpgn::d2cs::d2charinfo_load
push 0x10
call fcn.004035d0
push ebx
call fcn.0042b91f
add esp, 0x1c
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004217ea
mov esp, ebp
pop ebp
ret
push ebx
call fcn.0042b91f
add esp, 4
call fcn.0040f810
mov edx, eax
lea eax, [edx + 1]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x405568
mov ebx, dword [ebp - 0x8038]
sub edx, eax
mov ecx, ebx
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405580
sub ecx, esi
lea eax, [edx + 2]
push 0x231
add eax, ecx
push str.C:_builder_source_srcd2csd2charfile.cpp
push eax
call fcn.00418700
mov esi, eax
push ebx
push esi
mov dword [ebp - 0x8020], esi
call fcn.00404af0
push 0x4482c4
push esi
call fcn.0042ba70
mov ebx, eax
add esp, 0x1c
test ebx, ebx
jne 0x405618
call fcn.0042b896
push dword [eax]
call fcn.0042ca0c
mov dword [ebp - 0x8008], eax
lea eax, [ebp - 0x8008]
push eax
lea eax, [ebp - 0x8020]
push eax
push str.could_not_open_charsave_file____for_reading_and_writing__std::fopen:__
push str.pvpgn::d2cs::d2charinfo_load
push 0x10
call fcn.004035d0
push 0x236
push str.C:_builder_source_srcd2csd2charfile.cpp
push esi
call fcn.00418690
add esp, 0x24
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004217ea
mov esp, ebp
pop ebp
ret
push 0x239
push str.C:_builder_source_srcd2csd2charfile.cpp
push esi
call fcn.00418690
push ebx
push 0x8000
lea eax, [ebp - 0x8004]
push 1
push eax
call fcn.0042bc60
push ebx
mov dword [ebp - 0x8008], eax
call fcn.0042b998
add esp, 0x20
test eax, eax
jne 0x405679
call fcn.0042b896
push dword [eax]
call fcn.0042ca0c
mov dword [ebp - 0x8008], eax
lea eax, [ebp - 0x8008]
push eax
lea eax, [ebp - 0x8024]
push eax
push str.error_reading_charsave_file_for_character_____std::fread:__
jmp 0x40552d
lea eax, [ebp - 0x8000]
push eax
call fcn.0041c690
mov edi, eax
lea esi, [ebp - 0x7fe0]
lea eax, [ebp - 0x7fec]
cmp edi, 0x5c
cmovb esi, eax
push esi
call fcn.0041c5e0
and al, 0xbf
mov byte [ebp - 0x8018], al
push dword [ebp - 0x8018]
push esi
call fcn.0041c630
mov esi, dword [ebp - 0x8008]
add esp, 0x10
cmp edi, 0x5c
jb 0x4056e0
push 0xc
lea eax, [ebp - 0x8004]
push esi
push eax
call fcn.0041c900
push eax
lea eax, [ebp - 0x7ff8]
push eax
call fcn.0041c770
add esp, 0x14
push 0
push 0
push ebx
call fcn.0042bfc4
push ebx
push esi
lea eax, [ebp - 0x8004]
push 1
push eax
call fcn.0042c7f8
add esp, 0x1c
cmp eax, esi
je 0x40572b
call fcn.0042b896
push dword [eax]
call fcn.0042ca0c
mov dword [ebp - 0x8008], eax
lea eax, [ebp - 0x8008]
push eax
lea eax, [ebp - 0x8024]
push eax
push str.error_writing_charsave_file_for_character___std::fwrite:__
jmp 0x40552d
push ebx
call fcn.0042b91f
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004217ea
mov esp, ebp
pop ebp
ret
lea eax, [edi + 0x8e]
push 1
push eax
call fcn.0041c630
push 0x259
push str.C:_builder_source_srcd2csd2charfile.cpp
push esi
call fcn.00418690
mov ecx, dword [ebp - 4]
add esp, 0x14
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.004217ea
mov esp, ebp
pop ebp
ret