Function at 0x40b9b0
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
mov eax, 0x105c
push esi
push ebx
call fcn.005e3260
sub esp, eax
mov ebp, ecx
mov ebx, dword [esp + 0x1070]
mov dword [esp + 4], str.Loading_state_from__S...
mov dword [esp], 0x849160
mov dword [esp + 8], ebx
call fcn.0041f5d0
mov dword [esp + 4], 0x72f3b2
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__wfopen]
test eax, eax
je 0x40baf4
mov ebx, eax
mov dword [esp + 0xc], 2
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call fcn.005e9f50
mov dword [esp], ebx
call fcn.005e9c30
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov esi, eax
mov dword [esp + 8], 0
mov dword [esp], ebx
call fcn.005e9f50
lea eax, [esp + 0x50]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 3
mov dword [esp], eax
call sub.msvcrt.dll_fread
lea eax, [esp + 0x44]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 4
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp word [esp + 0x50], 0x4453
je 0x40bab2
mov dword [esp + 4], str.ERROR_in_State::load__:_invalid_snapshot_n
mov dword [esp], 0x849160
call fcn.0041f010
add esp, 0x105c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 4
cmp byte [esp + 0x52], 0x57
jne 0x40ba8f
mov edx, dword [esp + 0x44]
xor eax, eax
cmp edx, 0x102
je 0x40bb20
mov dword [esp + 8], edx
mov dword [esp + 4], str.ERROR_in_State::load__:_invalid_version__d__n
mov dword [esp], 0x849160
mov dword [esp + 0x18], eax
call fcn.0041f010
mov eax, dword [esp + 0x18]
add esp, 0x105c
pop ebx
pop esi
pop edi
pop ebp
ret 4
call fcn.0041f8c0
mov dword [esp + 4], str.ERROR_in_State::load__:_failed__wfopen__S__n
mov dword [esp + 8], eax
mov dword [esp], 0x849160
call fcn.0041f010
add esp, 0x105c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 4
sub esi, 7
mov dword [esp], esi
call fcn.006fec20
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov edi, eax
mov dword [esp + 4], esi
mov dword [esp], eax
mov dword [esp + 0x18], eax
call sub.msvcrt.dll_fread
lea eax, [esp + 0x48]
mov dword [esp + 4], esi
mov dword [esp], edi
mov dword [esp + 0x18], edi
mov dword [esp + 8], eax
call fcn.00462ec0
mov edi, dword [esp + 0x48]
mov dword [esp], edi
call fcn.006fec20
mov ecx, dword [esp + 0x18]
mov dword [esp + 0xc], esi
mov esi, eax
mov dword [esp + 4], edi
mov dword [esp], eax
mov dword [esp + 0x20], eax
mov dword [esp + 8], ecx
call fcn.00404250
mov eax, dword [esi]
lea edi, [ebp + 4]
mov ecx, ebp
and edi, 0xfffffffc
mov dword [ebp], eax
mov eax, dword [esi + 0x7f0]
sub ecx, edi
mov dword [ebp + 0x7f0], eax
mov eax, esi
sub esi, ecx
add ecx, 0x7f4
add eax, 0x7fc
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov edi, dword [eax - 8]
mov ecx, dword [eax - 4]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x7f4]
test ecx, ecx
mov dword [esp + 0x24], edi
cmove ecx, edi
mov dword [esp + 0x1c], eax
mov edi, eax
mov eax, dword [ebp + 0x7f8]
mov edx, eax
sub edx, edi
sar edx, 4
imul edx, edx, 0xcccccccd
cmp ecx, edx
ja 0x40c024
jae 0x40bc06
lea eax, [ecx + ecx*4]
shl eax, 4
add eax, dword [esp + 0x1c]
mov dword [ebp + 0x7f8], eax
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], edi
mov dword [esp + 8], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edx, edi
add edx, esi
mov eax, dword [edx + 4]
mov ecx, dword [edx]
lea edi, [edx + 8]
mov dword [esp + 0x28], edi
test eax, eax
mov dword [esp + 0x24], ecx
cmove eax, ecx
mov ecx, dword [ebp + 0x800]
mov edi, ecx
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebp + 0x804]
mov edx, ecx
sub edx, edi
sar edx, 2
imul edx, edx, 0x286bca1b
cmp eax, edx
ja 0x40be60
jae 0x40bc71
imul eax, eax, 0x4c
add eax, dword [esp + 0x1c]
mov dword [ebp + 0x804], eax
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edx, edi
add edx, esi
mov esi, dword [ebp + 0x828]
lea ecx, [edx + 8]
mov eax, dword [edx + 4]
mov edi, dword [edx]
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebp + 0x82c]
test eax, eax
cmove eax, edi
mov edx, ecx
sub edx, esi
cmp eax, edx
ja 0x40bdb0
jae 0x40bcc4
add eax, esi
mov dword [ebp + 0x82c], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], edi
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [0x8671d0]
cmp eax, 0x20
jne 0x40bcf1
mov dword [ebp + 0x120], 0
mov eax, dword [0x8671d0]
cmp eax, 0x40
jne 0x40bd00
mov dword [ebp + 0x120], 1
mov eax, dword [0x8671cc]
test eax, eax
je 0x40bd6a
sub eax, 0x3e8
cmp eax, 0x10
ja 0x40bd55
lea eax, [eax + eax*2]
mov edx, 0x66666667
shl eax, 2
mov ecx, dword [eax + 0x730060]
movzx esi, byte [eax + 0x730064]
mov eax, ecx
imul edx
mov eax, ecx
sar eax, 0x1f
sar edx, 2
sub edx, eax
lea eax, [edx + edx*4]
mov dword [ebp + 4], edx
add eax, eax
sub ecx, eax
mov eax, esi
test al, al
mov dword [ebp + 8], ecx
je 0x40bd63
mov byte [ebp + 0x11a], 3
jmp 0x40bd6a
mov dword [ebp + 4], 0
mov dword [ebp + 8], 0xffffffff
mov byte [ebp + 0x11a], 1
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov dword [esp + 4], 0x72f393
mov dword [esp], 0x849160
call fcn.0041f5d0
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call fcn.006febd0
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call fcn.006febd0
add esp, 0x105c
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret 4
sub eax, edx
mov dword [esp + 0x24], eax
je 0x40bcc4
mov eax, dword [ebp + 0x830]
sub eax, ecx
cmp dword [esp + 0x24], eax
jbe 0x40c324
mov eax, edx
not eax
cmp dword [esp + 0x24], eax
ja 0x40c4bf
mov eax, dword [esp + 0x24]
cmp edx, eax
cmovae eax, edx
add eax, edx
mov dword [esp + 0x2c], eax
jb 0x40c3c4
xor ecx, ecx
test eax, eax
mov dword [esp + 0x28], 0
jne 0x40c3d0
test edx, edx
jne 0x40c359
mov eax, dword [esp + 0x24]
mov dword [esp], ecx
mov dword [esp + 4], 0
mov dword [esp + 0x2c], ecx
lea edx, [ecx + eax]
mov dword [esp + 8], eax
mov dword [esp + 0x24], edx
call sub.msvcrt.dll_memset
test esi, esi
mov ecx, dword [esp + 0x2c]
jne 0x40c39e
mov eax, dword [esp + 0x24]
mov dword [ebp + 0x828], ecx
mov esi, ecx
mov dword [ebp + 0x82c], eax
mov eax, dword [esp + 0x28]
mov dword [ebp + 0x830], eax
jmp 0x40bcc4
sub eax, edx
mov edi, eax
mov dword [esp + 0x2c], eax
je 0x40bc71
mov eax, dword [ebp + 0x808]
sub eax, ecx
sar eax, 2
imul eax, eax, 0x286bca1b
cmp edi, eax
jbe 0x40c1d0
mov eax, 0x35e50d7
sub eax, edx
cmp dword [esp + 0x2c], eax
ja 0x40c4fd
cmp edx, edi
mov eax, edi
cmovae eax, edx
add edx, eax
setb al
cmp edx, 0x35e50d7
mov dword [esp + 0x30], edx
movzx eax, al
ja 0x40c3b3
test eax, eax
jne 0x40c3b3
test edx, edx
je 0x40c4b2
imul eax, edx, 0x4c
mov dword [esp + 0x30], eax
mov dword [esp], eax
call fcn.006fec40
mov dword [esp + 0x1c], eax
mov ecx, dword [ebp + 0x800]
mov eax, dword [ebp + 0x804]
cmp eax, ecx
mov dword [esp + 0x38], ecx
je 0x40c40e
mov edx, ecx
add ecx, 0x4c
mov dword [esp + 0x3c], ebx
sub eax, ecx
shr eax, 2
imul eax, eax, 0x286bca1b
and eax, 0x3fffffff
add eax, 1
imul eax, eax, 0x4c
mov ecx, eax
mov eax, dword [esp + 0x1c]
add ecx, eax
mov dword [esp + 0x34], ecx
mov ebx, ecx
nop
test eax, eax
je 0x40c43a
mov edi, eax
add eax, 0x4c
mov esi, edx
add edx, 0x4c
cmp ebx, eax
mov ecx, 0x13
rep movsd dword es:[edi], dword [esi]
jne 0x40bf20
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
lea esi, [esi]
test eax, eax
je 0x40c466
mov dword [eax], 0
mov dword [eax + 4], 0
add eax, 0x4c
mov dword [eax - 0x44], 0
mov dword [eax - 0x40], 0
mov dword [eax - 0x3c], 0
mov dword [eax - 0x38], 0
mov dword [eax - 0x34], 0
mov dword [eax - 0x30], 0
mov dword [eax - 0x2c], 0
mov dword [eax - 0x28], 0
mov dword [eax - 0x24], 0
mov dword [eax - 0x20], 0
mov dword [eax - 0x1c], 0xfffffffe
mov dword [eax - 0x18], 0
mov dword [eax - 0x14], 0
mov dword [eax - 0x10], 0
mov dword [eax - 0xc], 0
mov dword [eax - 8], 0
mov dword [eax - 4], 0
sub edx, 1
jne 0x40bf50
imul eax, dword [esp + 0x2c], 0x4c
mov esi, dword [esp + 0x34]
add esi, eax
mov eax, dword [esp + 0x38]
test eax, eax
je 0x40c003
mov dword [esp], eax
call fcn.006febf0
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
mov dword [ebp + 0x804], esi
add eax, edi
mov dword [ebp + 0x800], edi
mov dword [ebp + 0x808], eax
jmp 0x40bc71
sub ecx, edx
mov edi, ecx
mov dword [esp + 0x2c], ecx
je 0x40bc06
mov ecx, dword [ebp + 0x7fc]
sub ecx, eax
sar ecx, 4
imul ecx, ecx, 0xcccccccd
cmp edi, ecx
jbe 0x40c280
mov ecx, 0x3333333
sub ecx, edx
cmp dword [esp + 0x2c], ecx
ja 0x40c4f1
cmp edx, edi
mov ecx, edi
cmovae ecx, edx
add edx, ecx
jb 0x40c3f7
cmp edx, 0x3333333
ja 0x40c3f7
test edx, edx
je 0x40c41b
lea esi, [edx + edx*4]
shl esi, 4
mov dword [esp], esi
call fcn.006fec40
mov edi, dword [ebp + 0x7f4]
mov ecx, eax
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x7f8]
add esi, ecx
mov dword [esp + 0x38], esi
mov dword [esp + 0x30], edi
mov ecx, edi
cmp ecx, eax
je 0x40c401
mov edx, ecx
add ecx, 0x50
mov dword [esp + 0x3c], ebx
sub eax, ecx
shr eax, 4
imul eax, eax, 0xccccccd
and eax, 0xfffffff
lea eax, [eax + eax*4 + 5]
shl eax, 4
mov ecx, eax
mov eax, dword [esp + 0x1c]
add ecx, eax
mov dword [esp + 0x34], ecx
mov ebx, ecx
test eax, eax
je 0x40c450
mov edi, eax
add eax, 0x50
mov esi, edx
add edx, 0x50
cmp ebx, eax
mov ecx, 0x14
rep movsd dword es:[edi], dword [esi]
jne 0x40c0e1
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
lea esi, [esi]
test eax, eax
je 0x40c479
mov dword [eax], 0xffffffff
mov dword [eax + 4], 0
add eax, 0x50
mov dword [eax - 0x48], 0
mov dword [eax - 0x44], 0
mov dword [eax - 0x40], 0
mov dword [eax - 0x3c], 0
mov dword [eax - 0x38], 0
mov dword [eax - 0x34], 0
mov dword [eax - 0x30], 0
mov dword [eax - 0x2c], 0
mov dword [eax - 0x28], 0
mov dword [eax - 0x24], 0
mov dword [eax - 0x20], 0
mov dword [eax - 0x1c], 0x1c
mov dword [eax - 8], 0
mov dword [eax - 4], 0
sub edx, 1
jne 0x40c110
mov eax, dword [esp + 0x2c]
lea esi, [eax + eax*4]
mov eax, dword [esp + 0x30]
shl esi, 4
add esi, dword [esp + 0x34]
test eax, eax
je 0x40c1ad
mov dword [esp], eax
call fcn.006febf0
mov eax, dword [esp + 0x1c]
mov dword [ebp + 0x7f8], esi
mov dword [ebp + 0x7f4], eax
mov eax, dword [esp + 0x38]
mov dword [ebp + 0x7fc], eax
jmp 0x40bc06
mov eax, ecx
mov edx, edi
test eax, eax
je 0x40c49f
mov dword [eax], 0
mov dword [eax + 4], 0
add eax, 0x4c
mov dword [eax - 0x44], 0
mov dword [eax - 0x40], 0
mov dword [eax - 0x3c], 0
mov dword [eax - 0x38], 0
mov dword [eax - 0x34], 0
mov dword [eax - 0x30], 0
mov dword [eax - 0x2c], 0
mov dword [eax - 0x28], 0
mov dword [eax - 0x24], 0
mov dword [eax - 0x20], 0
mov dword [eax - 0x1c], 0xfffffffe
mov dword [eax - 0x18], 0
mov dword [eax - 0x14], 0
mov dword [eax - 0x10], 0
mov dword [eax - 0xc], 0
mov dword [eax - 8], 0
mov dword [eax - 4], 0
sub edx, 1
jne 0x40c1d4
imul eax, dword [esp + 0x2c], 0x4c
add ecx, eax
mov dword [ebp + 0x804], ecx
jmp 0x40bc71
mov edx, eax
mov ecx, edi
test edx, edx
je 0x40c48c
mov dword [edx], 0xffffffff
mov dword [edx + 4], 0
add edx, 0x50
mov dword [edx - 0x48], 0
mov dword [edx - 0x44], 0
mov dword [edx - 0x40], 0
mov dword [edx - 0x3c], 0
mov dword [edx - 0x38], 0
mov dword [edx - 0x34], 0
mov dword [edx - 0x30], 0
mov dword [edx - 0x2c], 0
mov dword [edx - 0x28], 0
mov dword [edx - 0x24], 0
mov dword [edx - 0x20], 0
mov dword [edx - 0x1c], 0x1c
mov dword [edx - 8], 0
mov dword [edx - 4], 0
sub ecx, 1
jne 0x40c284
mov esi, dword [esp + 0x2c]
lea edx, [esi + esi*4]
shl edx, 4
add eax, edx
mov dword [ebp + 0x7f8], eax
mov eax, dword [ebp + 0x7f4]
mov dword [esp + 0x1c], eax
jmp 0x40bc06
mov esi, dword [esp + 0x24]
mov dword [esp], ecx
mov dword [esp + 4], 0
mov dword [esp + 0x24], ecx
mov dword [esp + 8], esi
call sub.msvcrt.dll_memset
mov ecx, dword [esp + 0x24]
mov eax, esi
mov esi, dword [ebp + 0x828]
add eax, ecx
mov dword [ebp + 0x82c], eax
jmp 0x40bcc4
mov dword [esp + 8], edx
mov dword [esp], ecx
mov dword [esp + 4], esi
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], ecx
call sub.msvcrt.dll_memmove
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x24]
mov dword [esp + 4], 0
add edx, ecx
lea ecx, [edx + eax]
mov dword [esp + 8], eax
mov dword [esp], edx
mov dword [esp + 0x24], ecx
call sub.msvcrt.dll_memset
mov ecx, dword [esp + 0x2c]
mov dword [esp], esi
mov dword [esp + 0x2c], ecx
call fcn.006febf0
mov ecx, dword [esp + 0x2c]
jmp 0x40be3a
mov dword [esp + 0x30], 0xffffffd4
mov eax, dword [esp + 0x30]
jmp 0x40bece
mov dword [esp + 0x2c], 0xffffffff
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call fcn.006fec40
mov ecx, eax
mov eax, dword [esp + 0x2c]
mov esi, dword [ebp + 0x828]
mov edx, dword [ebp + 0x82c]
add eax, ecx
sub edx, esi
mov dword [esp + 0x28], eax
jmp 0x40be03
mov esi, 0xfffffff0
jmp 0x40c085
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], eax
jmp 0x40c106
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], eax
jmp 0x40bf45
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x38], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x30], esi
mov ecx, esi
jmp 0x40c0ab
add edx, 0x4c
cmp ebx, 0x4c
je 0x40bf3d
mov eax, 0x4c
jmp 0x40bf28
add edx, 0x50
cmp ebx, 0x50
je 0x40c0fe
mov eax, 0x50
jmp 0x40c0e9
sub edx, 1
je 0x40bfe8
mov eax, 0x4c
jmp 0x40bf58
sub edx, 1
je 0x40c18f
mov eax, 0x50
jmp 0x40c118
sub ecx, 1
je 0x40c303
mov edx, 0x50
jmp 0x40c28c
sub edx, 1
je 0x40c26c
mov eax, 0x4c
jmp 0x40c1dc
mov dword [esp + 0x1c], 0
jmp 0x40beda
mov dword [esp], 0x72f43d
call fcn.006e46c0
mov ebx, eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call fcn.006febd0
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call fcn.006febd0
mov dword [esp], ebx
call fcn.005e6130
mov ebx, eax
jmp 0x40c4d9
mov dword [esp], 0x72f43d
call fcn.006e46c0
mov dword [esp], 0x72f43d
call fcn.006e46c0
nop
lea esi, [esi]