Function at 0x461520
Capabilities:
Check if file exists
Read file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d8d44
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x1130
call fcn.005a2ab0
mov eax, dword [0x693f30]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov esi, ecx
mov dword [ebp - 0x112c], esi
mov dword [ebp - 0x113c], esi
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x1120], esi
mov dword [ebp - 0x1120], eax
lea eax, [ebp - 0x1070]
push edi
push eax
call fcn.00456330
add esp, 8
mov dword [ebp - 4], 0
mov eax, edi
cmp dword [edi + 0x14], 8
jb 0x4615a5
mov eax, dword [edi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x461748
mov ecx, dword [ebp - 0x1060]
mov byte [ebp - 0x1119], al
mov eax, accept
sub eax, ecx
cmp eax, 5
jb 0x461fe8
cmp dword [ebp - 0x105c], 0x10
lea eax, [ebp - 0x1070]
push ecx
cmovae eax, dword [ebp - 0x1070]
push eax
push 5
push str.File
push ecx
push dword [ebp - 0x1120]
lea ecx, [ebp - 0x1058]
call fcn.00409140
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x1044]
mov eax, edx
mov ecx, dword [ebp - 0x1048]
sub eax, ecx
push 0xf
push str._does_not_exist
cmp eax, 0xf
jb 0x461655
cmp edx, 0x10
lea esi, [ebp - 0x1058]
lea eax, [ecx + 0xf]
cmovae esi, dword [ebp - 0x1058]
add esi, ecx
mov dword [ebp - 0x1048], eax
push esi
call fcn.005a4460
mov byte [esi + 0xf], 0
lea eax, [ebp - 0x1058]
mov esi, dword [ebp - 0x112c]
add esp, 0xc
jmp 0x461668
push dword [ebp - 0x1120]
lea ecx, [ebp - 0x1058]
push 0xf
call fcn.00406db0
movups xmm0, xmmword [eax]
movq xmm1, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
movups xmmword [esi], xmm0
movq qword [esi + 0x10], xmm1
lea eax, [ebp - 0x1119]
mov byte [ebp - 4], 0xa
push eax
lea ecx, [esi + 0x18]
call fcn.0045ebf0
mov ecx, dword [ebp - 0x1044]
cmp ecx, 0x10
jb 0x4616ea
mov edx, dword [ebp - 0x1058]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4616e0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x461fed
push ecx
push edx
call fcn.005a242d
add esp, 8
mov ecx, dword [ebp - 0x105c]
mov dword [ebp - 0x1048], 0
mov dword [ebp - 0x1044], 0xf
mov byte [ebp - 0x1058], 0
cmp ecx, 0x10
jb 0x461fc8
mov edx, dword [ebp - 0x1070]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x461739
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x461fed
push ecx
push edx
call fcn.005a242d
add esp, 8
jmp 0x461fc8
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x461752
mov eax, dword [edi]
push 0x679f6c
push eax
lea eax, [ebp - 0x1128]
push eax
call fcn.005b525b
add esp, 0xc
test eax, eax
je 0x461906
mov edx, eax
mov byte [ebp - 0x1119], 0
lea ecx, [ebp - 0x1118]
call fcn.00403af0
mov edi, eax
mov byte [ebp - 4], 0xd
mov ecx, accept
mov edx, dword [ebp - 0x1060]
sub ecx, edx
cmp ecx, 5
jb 0x461ff2
cmp dword [ebp - 0x105c], 0x10
lea eax, [ebp - 0x1070]
push edx
cmovae eax, dword [ebp - 0x1070]
push eax
push 5
push str.Open
push ecx
push dword [ebp - 0x1120]
lea ecx, [ebp - 0x1058]
call fcn.00409140
mov byte [ebp - 4], 0xe
mov edx, dword [ebp - 0x1044]
mov eax, edx
mov ecx, dword [ebp - 0x1048]
sub eax, ecx
push 0x14
push str._failed__error_code:
cmp eax, 0x14
jb 0x461824
cmp edx, 0x10
lea esi, [ebp - 0x1058]
lea eax, [ecx + 0x14]
cmovae esi, dword [ebp - 0x1058]
add esi, ecx
mov dword [ebp - 0x1048], eax
push esi
call fcn.005a4460
mov byte [esi + 0x14], 0
lea eax, [ebp - 0x1058]
mov esi, dword [ebp - 0x112c]
add esp, 0xc
jmp 0x461837
push dword [ebp - 0x1120]
lea ecx, [ebp - 0x1058]
push 0x14
call fcn.00406db0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x10a0], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x1090], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
push edi
lea eax, [ebp - 0x10a0]
mov byte [ebp - 4], 0x11
push eax
push dword [ebp - 0x1120]
lea ecx, [ebp - 0x1088]
call fcn.00429bf0
movups xmm0, xmmword [ebp - 0x1088]
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x1078]
movq qword [esi + 0x10], xmm0
lea eax, [ebp - 0x1119]
mov dword [ebp - 0x1078], 0
push eax
lea ecx, [esi + 0x18]
mov dword [ebp - 0x1074], 0xf
mov byte [ebp - 0x1088], 0
mov byte [ebp - 4], 0x12
call fcn.0045ebf0
lea ecx, [ebp - 0x1088]
call fcn.00405ad0
lea ecx, [ebp - 0x10a0]
call fcn.00405ad0
lea ecx, [ebp - 0x1058]
call fcn.00405ad0
lea ecx, [ebp - 0x1118]
call fcn.00405ad0
jmp 0x461fbd
push 2
push 0
push dword [ebp - 0x1128]
call fcn.005bac09
add esp, 0xc
push dword [ebp - 0x1128]
call fcn.005bbfd6
add esp, 4
mov dword [ebp - 0x113c], eax
push 0
push 0
push dword [ebp - 0x1128]
call fcn.005bac09
add esp, 0xc
lea ecx, [ebp - 0x1118]
mov edx, edi
call fcn.00462000
xor edx, edx
lea eax, [ebp - 0x1040]
push 0x1000
push edx
push eax
mov dword [ebp - 0x1138], edx
call fcn.005a49e0
xor eax, eax
lea ecx, [ebp - 0x10a0]
add esp, 0xc
mov dword [ebp - 0x1134], eax
mov dword [ebp - 0x1130], eax
mov dword [ebp - 0x1124], eax
call fcn.00405db0
cmp dword [ebp - 0x113c], 0
mov byte [ebp - 4], 0x16
mov byte [ebp - 0x1119], 1
jbe 0x461f5d
nop
cmp dword [ebp - 0x1124], 0
jne 0x461c6b
mov eax, dword [ebp - 0x1138]
lea esi, [ebp - 0x16]
add eax, 1
mov dword [ebp - 0x1138], eax
mov ecx, eax
jns 0x4619f2
neg ecx
mov eax, 0xcccccccd
sub esi, 2
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [esi], cx
mov ecx, edx
test ecx, ecx
jne 0x4619c5
add esi, 0xfffffffe
mov eax, 0x2d
mov word [esi], ax
jmp 0x461a12
mov eax, 0xcccccccd
sub esi, 2
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [esi], cx
mov ecx, edx
test ecx, ecx
jne 0x4619f2
push ecx
lea eax, [ebp - 0x16]
push eax
push esi
lea ecx, [ebp - 0x10b8]
call fcn.00418440
mov byte [ebp - 4], 0x17
mov eax, accept
mov ecx, dword [edi + 0x10]
sub eax, ecx
cmp eax, 1
jb 0x461fe8
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x461a44
mov eax, dword [edi]
push 1
push 0x63ff6c
push ecx
push eax
push ecx
push dword [ebp - 0x1120]
lea ecx, [ebp - 0x10d0]
call fcn.0040a060
lea eax, [ebp - 0x10b8]
mov byte [ebp - 4], 0x18
push eax
lea eax, [ebp - 0x10d0]
push eax
push dword [ebp - 0x1120]
lea ecx, [ebp - 0x1088]
call fcn.00418260
lea eax, [ebp - 0x1118]
mov byte [ebp - 4], 0x19
push eax
lea eax, [ebp - 0x1088]
push eax
lea eax, [ebp - 0x1058]
push eax
call fcn.00428990
add esp, 0xc
mov byte [ebp - 4], 0x1b
mov ecx, dword [ebp - 0x1074]
cmp ecx, 8
jb 0x461ae7
mov edx, dword [ebp - 0x1088]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x461add
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x461fed
push ecx
push edx
call fcn.005a242d
add esp, 8
xor eax, eax
mov dword [ebp - 0x1078], 0
mov dword [ebp - 0x1074], 7
mov word [ebp - 0x1088], ax
mov byte [ebp - 4], 0x1c
mov ecx, dword [ebp - 0x10bc]
cmp ecx, 8
jb 0x461b48
mov edx, dword [ebp - 0x10d0]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x461b3e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x461fed
push ecx
push edx
call fcn.005a242d
add esp, 8
mov byte [ebp - 4], 0x1d
mov ecx, dword [ebp - 0x10a4]
cmp ecx, 8
jb 0x461b8c
mov edx, dword [ebp - 0x10b8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x461b82
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x461fed
push ecx
push edx
call fcn.005a242d
add esp, 8
cmp dword [ebp - 0x1044], 8
lea eax, [ebp - 0x1058]
push 0x679f74
cmovae eax, dword [ebp - 0x1058]
push eax
lea eax, [ebp - 0x1124]
push eax
call fcn.005b525b
add esp, 0xc
test eax, eax
jne 0x461d30
mov ecx, dword [ebp - 0x1120]
mov eax, dword [ecx + 4]
cmp eax, dword [ecx + 8]
je 0x461c1a
mov dword [eax], 0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
movups xmm0, xmmword [ebp - 0x1058]
movups xmmword [eax], xmm0
movq xmm0, qword [ebp - 0x1048]
movq qword [eax + 0x10], xmm0
xor edx, edx
mov dword [ebp - 0x1048], 0
add dword [ecx + 4], 0x18
mov eax, 7
mov dword [ebp - 0x1044], eax
mov word [ebp - 0x1058], dx
jmp 0x461c2d
lea edx, [ebp - 0x1058]
push edx
push eax
call fcn.00416a60
mov eax, dword [ebp - 0x1044]
mov byte [ebp - 4], 0x16
cmp eax, 8
jb 0x461c6b
mov edx, dword [ebp - 0x1058]
lea ecx, [eax*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x461c61
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x461fed
push ecx
push edx
call fcn.005a242d
add esp, 8
push 0x1000
lea eax, [ebp - 0x1040]
push 0
push eax
call fcn.005a49e0
add esp, 0xc
lea eax, [ebp - 0x1040]
push dword [ebp - 0x1128]
push 0x1000
push 1
push eax
call fcn.005b9e8a
mov esi, eax
add esp, 0x10
cmp esi, 0x1000
je 0x461cbd
push dword [ebp - 0x1128]
call fcn.005bd535
add esp, 4
test eax, eax
je 0x461df4
push dword [ebp - 0x1124]
add dword [ebp - 0x1134], esi
lea eax, [ebp - 0x1040]
push esi
push 1
push eax
call fcn.005ba20c
add esp, 0x10
cmp eax, esi
jne 0x461e97
mov ecx, dword [ebp - 0x1130]
add ecx, eax
mov dword [ebp - 0x1130], ecx
cmp ecx, 0x500000
jb 0x461d19
push dword [ebp - 0x1124]
call fcn.005b4fd9
add esp, 4
mov dword [ebp - 0x1124], 0
xor eax, eax
mov dword [ebp - 0x1130], eax
mov eax, dword [ebp - 0x1134]
cmp eax, dword [ebp - 0x113c]
jb 0x4619a0
jmp 0x461f57
mov edx, eax
mov byte [ebp - 0x1119], 0
lea ecx, [ebp - 0x30]
call fcn.00403af0
mov esi, eax
lea eax, [ebp - 0x1058]
mov byte [ebp - 4], 0x1e
push eax
lea eax, [ebp - 0x1100]
push eax
call fcn.00456330
push eax
mov edx, str.Open
mov byte [ebp - 4], 0x1f
lea ecx, [ebp - 0x10e8]
call fcn.00428b60
add esp, 0xc
push str._failed__error_code:
push eax
lea eax, [ebp - 0x10d0]
mov byte [ebp - 4], 0x20
push eax
call fcn.00428870
add esp, 0xc
push esi
push eax
lea eax, [ebp - 0x10b8]
mov byte [ebp - 4], 0x21
push eax
call fcn.00428970
add esp, 0xc
lea ecx, [ebp - 0x10a0]
push eax
call fcn.00405b20
lea ecx, [ebp - 0x10b8]
call fcn.00405ad0
lea ecx, [ebp - 0x10d0]
call fcn.00405ad0
lea ecx, [ebp - 0x10e8]
call fcn.00405ad0
lea ecx, [ebp - 0x1100]
call fcn.00405ad0
lea ecx, [ebp - 0x30]
call fcn.00405ad0
lea ecx, [ebp - 0x1058]
mov byte [ebp - 4], 0x16
call fcn.004040f0
jmp 0x461f57
push dword [ebp - 0x1128]
mov byte [ebp - 0x1119], 0
call fcn.005bd561
add esp, 4
lea ecx, [ebp - 0x10b8]
mov edx, eax
call fcn.00403af0
mov esi, eax
lea eax, [ebp - 0x1070]
mov byte [ebp - 4], 0x26
push eax
lea eax, [ebp - 0x10e8]
push str.Read
push eax
call fcn.00428b00
add esp, 0xc
push str._failed__error_code:
push eax
lea eax, [ebp - 0x1100]
mov byte [ebp - 4], 0x27
push eax
call fcn.00428870
add esp, 0xc
push esi
push eax
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 0x28
push eax
call fcn.00428970
add esp, 0xc
lea ecx, [ebp - 0x10a0]
push eax
call fcn.00405b20
lea ecx, [ebp - 0x30]
call fcn.00405ad0
lea ecx, [ebp - 0x1100]
call fcn.00405ad0
lea ecx, [ebp - 0x10e8]
call fcn.00405ad0
lea ecx, [ebp - 0x10b8]
jmp 0x461f4e
push dword [ebp - 0x1124]
mov byte [ebp - 0x1119], 0
call fcn.005bd561
add esp, 4
lea ecx, [ebp - 0x10d0]
mov edx, eax
call fcn.00403af0
mov esi, eax
mov edx, dword [ebp - 0x1138]
lea ecx, [ebp - 0x10b8]
mov byte [ebp - 4], 0x29
call fcn.00403af0
push eax
mov edx, str.Write
mov byte [ebp - 4], 0x2a
lea ecx, [ebp - 0x10e8]
call fcn.00428b60
add esp, 4
push str.th_piece_failed__error_code:
push eax
lea eax, [ebp - 0x1100]
mov byte [ebp - 4], 0x2b
push eax
call fcn.00428870
add esp, 0xc
push esi
push eax
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 0x2c
push eax
call fcn.00428970
add esp, 0xc
lea ecx, [ebp - 0x10a0]
push eax
call fcn.00405b20
lea ecx, [ebp - 0x30]
call fcn.00405ad0
lea ecx, [ebp - 0x1100]
call fcn.00405ad0
lea ecx, [ebp - 0x10e8]
call fcn.00405ad0
lea ecx, [ebp - 0x10b8]
call fcn.00405ad0
lea ecx, [ebp - 0x10d0]
mov byte [ebp - 4], 0x16
call fcn.00405ad0
mov esi, dword [ebp - 0x112c]
mov eax, dword [ebp - 0x1124]
test eax, eax
je 0x461f7a
push eax
call fcn.005b4fd9
add esp, 4
mov dword [ebp - 0x1124], 0
push dword [ebp - 0x1128]
call fcn.005b4fd9
add esp, 4
mov dword [ebp - 0x1128], 0
lea eax, [ebp - 0x10a0]
mov ecx, esi
push eax
lea eax, [ebp - 0x1119]
push eax
call fcn.004638a0
lea ecx, [ebp - 0x10a0]
call fcn.00405ad0
lea ecx, [ebp - 0x1118]
call fcn.004040f0
lea ecx, [ebp - 0x1070]
call fcn.00405ad0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005a1c7e
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004033f0
call fcn.005a7b3f
call fcn.004033f0
int3