Function at 0x42c950
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x480c6b
mov eax, dword fs:[0]
push eax
sub esp, 0x480
mov eax, dword [0x497040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x424], ecx
mov ecx, dword [ebp - 0x424]
add ecx, 0x38
call fcn.0042e050
mov ecx, dword [ebp - 0x424]
add ecx, 0x44
call fcn.0042e110
mov ecx, dword [ebp - 0x424]
add ecx, 0x50
call fcn.0042e110
mov ecx, dword [ebp - 0x424]
add ecx, 0x5c
call fcn.0042e110
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov ecx, dword [ebp - 0x424]
add ecx, 0x20
call fcn.0042bdf0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x42c], eax
cmp dword [ebp - 0x42c], 0xffffffff
jne 0x42c9f6
xor eax, eax
jmp 0x42cd8e
push 0
mov eax, dword [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x434], eax
mov ecx, dword [ebp - 0x434]
add ecx, 3
push ecx
call fcn.0042f4e2
add esp, 4
mov dword [ebp - 0x44c], eax
mov edx, dword [ebp - 0x44c]
mov dword [ebp - 0x418], edx
mov eax, dword [ebp - 0x434]
add eax, 3
push eax
push 0
mov ecx, dword [ebp - 0x418]
push ecx
call fcn.00431510
add esp, 0xc
mov edx, dword [ebp - 0x418]
mov dword [ebp - 0x41c], edx
push 0
lea eax, [ebp - 0x414]
push eax
mov ecx, dword [ebp - 0x434]
push ecx
mov edx, dword [ebp - 0x418]
push edx
mov eax, dword [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
nop
mov ecx, 1
test ecx, ecx
je 0x42cd22
mov edx, dword [ebp - 0x418]
mov al, byte [edx]
mov byte [ebp - 0x41e], al
mov ecx, dword [ebp - 0x418]
add ecx, 2
mov dword [ebp - 0x418], ecx
push 0xd
mov edx, dword [ebp - 0x418]
push edx
call fcn.00411e70
add esp, 8
mov dword [ebp - 0x438], eax
cmp dword [ebp - 0x438], 0
jne 0x42caca
jmp 0x42cd22
mov eax, dword [ebp - 0x418]
sub eax, dword [ebp - 0x41c]
cmp eax, dword [ebp - 0x414]
jle 0x42cae3
jmp 0x42cd22
mov ecx, dword [ebp - 0x438]
mov byte [ecx], 0
mov edx, dword [ebp - 0x418]
push edx
push 0x400
lea eax, [ebp - 0x410]
push eax
call fcn.0043dfab
add esp, 0xc
lea ecx, [ebp - 0x410]
mov dword [ebp - 0x428], ecx
mov edx, dword [ebp - 0x428]
add edx, 1
mov dword [ebp - 0x450], edx
mov eax, dword [ebp - 0x428]
mov cl, byte [eax]
mov byte [ebp - 0x41d], cl
add dword [ebp - 0x428], 1
cmp byte [ebp - 0x41d], 0
jne 0x42cb22
mov edx, dword [ebp - 0x428]
sub edx, dword [ebp - 0x450]
mov dword [ebp - 0x454], edx
mov eax, dword [ebp - 0x454]
mov dword [ebp - 0x430], eax
mov ecx, dword [ebp - 0x430]
movsx edx, byte [ebp + ecx - 0x411]
cmp edx, 0xd
je 0x42cb84
mov eax, dword [ebp - 0x430]
movsx ecx, byte [ebp + eax - 0x411]
cmp ecx, 0xa
jne 0x42cbb5
mov edx, dword [ebp - 0x430]
sub edx, 1
mov dword [ebp - 0x43c], edx
cmp dword [ebp - 0x43c], 0x400
jae 0x42cba1
jmp 0x42cba7
call fcn.0042f613
nop
mov eax, dword [ebp - 0x43c]
mov byte [ebp + eax - 0x410], 0
mov ecx, dword [ebp - 0x430]
mov edx, dword [ebp - 0x418]
lea eax, [edx + ecx + 1]
mov dword [ebp - 0x418], eax
mov ecx, dword [ebp - 0x418]
movsx edx, byte [ecx]
cmp edx, 0xa
jne 0x42cbe8
mov eax, dword [ebp - 0x418]
add eax, 1
mov dword [ebp - 0x418], eax
mov cl, byte [ebp - 0x41e]
mov byte [ebp - 0x440], cl
cmp byte [ebp - 0x440], 0x43
je 0x42cc51
cmp byte [ebp - 0x440], 0x44
je 0x42cc0b
jmp 0x42cc97
lea edx, [ebp - 0x410]
push edx
lea ecx, [ebp - 0x474]
call fcn.00409200
mov dword [ebp - 4], 0
lea eax, [ebp - 0x474]
push eax
mov ecx, dword [ebp - 0x424]
add ecx, 0x44
call fcn.004087b0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x474]
call fcn.00412070
nop
jmp 0x42cd1d
lea ecx, [ebp - 0x410]
push ecx
lea ecx, [ebp - 0x48c]
call fcn.00409200
mov dword [ebp - 4], 1
lea edx, [ebp - 0x48c]
push edx
mov ecx, dword [ebp - 0x424]
add ecx, 0x5c
call fcn.004087b0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48c]
call fcn.00412070
nop
jmp 0x42cd1d
xor eax, eax
jne 0x42ccb3
push 0x18e
push str.E:TempDocumentsVisual_Studio_2022ProjectExFC_PatcherExFC_PatcherPatchThread.cpp
push str.0___Invalid_Patch_Code_
call dword [0x497b08]
add esp, 0xc
cmp dword [ebp - 0x41c], 0
je 0x42cd0c
mov edx, dword [ebp - 0x41c]
mov dword [ebp - 0x444], edx
mov eax, dword [ebp - 0x444]
push eax
call fcn.0042f4eb
add esp, 4
cmp dword [ebp - 0x444], 0
jne 0x42ccec
mov dword [ebp - 0x458], 0
jmp 0x42cd02
mov dword [ebp - 0x41c], 0x8123
mov ecx, dword [ebp - 0x41c]
mov dword [ebp - 0x458], ecx
mov dword [ebp - 0x41c], 0
mov edx, dword [ebp - 0x42c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x42cd8e
jmp 0x42ca7b
mov eax, dword [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp dword [ebp - 0x41c], 0
je 0x42cd89
mov ecx, dword [ebp - 0x41c]
mov dword [ebp - 0x448], ecx
mov edx, dword [ebp - 0x448]
push edx
call fcn.0042f4eb
add esp, 4
cmp dword [ebp - 0x448], 0
jne 0x42cd69
mov dword [ebp - 0x45c], 0
jmp 0x42cd7f
mov dword [ebp - 0x41c], 0x8123
mov eax, dword [ebp - 0x41c]
mov dword [ebp - 0x45c], eax
mov dword [ebp - 0x41c], 0
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042f4a5
mov esp, ebp
pop ebp
ret