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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d0a55
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x52cc80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov dword [ebp - 0x134], ebx
mov eax, ecx
mov dword [ebp - 0x15c], eax
xor ecx, ecx
mov dword [ebp - 0x150], ecx
mov edi, dword [0x531d90]
mov ecx, edi
imul ecx, edi
mov dword [ebp - 0x164], eax
mov eax, ecx
imul eax, edi
cdq
mov esi, 0xd
idiv esi
cmp edx, 0xa
jne 0x4226a6
mov eax, ecx
cdq
mov ecx, 0xf
idiv ecx
cmp edx, 5
je 0x42268d
lea ecx, [edi + 2]
lea eax, [edi + 1]
imul eax, ecx
imul eax, edi
cdq
mov ecx, 0x14
idiv ecx
mov eax, 0x176d4529
cmp edx, 0xc
cmove edi, eax
mov dword [0x531d90], edi
xor esi, esi
mov ebx, edi
mov eax, ebx
lea ecx, [edi + esi]
cdq
inc esi
idiv ecx
dec ebx
cmp esi, 0x45
jb 0x422691
mov ebx, dword [ebp - 0x134]
mov eax, dword [0x52c6d8]
mov ecx, 0x52c6d8
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x130], esi
mov dword [ebp - 4], 2
mov eax, dword [ebx]
cmp dword [eax - 0xc], 0
je 0x42277b
mov ecx, 0x50f1e8
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4226fa
test dx, dx
je 0x4226f6
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4226fa
add eax, 4
add ecx, 4
test dx, dx
jne 0x4226d4
xor eax, eax
jmp 0x4226ff
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
jne 0x42277b
lea ecx, [ebp - 0x140]
call fcn.004216d0
mov byte [ebp - 4], 3
mov ecx, 1
mov dword [ebp - 0x150], ecx
mov ecx, dword [eax]
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x422739
push 0x80004005
call fcn.00401a60
mov eax, dword [ebx]
jmp 0x422740
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x422766
test dx, dx
je 0x422762
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x422766
add eax, 4
add ecx, 4
test dx, dx
jne 0x422740
xor eax, eax
jmp 0x42276b
sbb eax, eax
or eax, 1
test eax, eax
sete al
mov byte [ebp - 0x129], 0
test al, al
je 0x422782
mov byte [ebp - 0x129], 1
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x150]
or ebx, 0xffffffff
test al, 1
je 0x4227c2
and eax, 0xfffffffe
mov dword [ebp - 0x150], eax
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x140]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4227c2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0x129], 0
je 0x4228da
lea ecx, [ebp - 0x138]
call fcn.004216d0
mov byte [ebp - 4], 5
mov edx, dword [eax]
lea eax, [esi - 0x10]
lea edi, [edx - 0x10]
mov dword [ebp - 0x134], eax
cmp edi, eax
je 0x4228ae
cmp dword [eax + 0xc], 0
lea ecx, [eax + 0xc]
mov dword [ebp - 0x140], ecx
jl 0x422899
mov ecx, dword [edi]
cmp ecx, dword [eax]
jne 0x422899
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
lea edx, [edi + 0xc]
mov ecx, eax
jl 0x422832
cmp ecx, dword [edi]
jne 0x422832
mov esi, edi
mov eax, 1
lock xadd dword [edx], eax
jmp 0x42286f
mov eax, dword [ecx]
push 2
push dword [edi + 4]
call dword [eax]
mov esi, eax
test esi, esi
jne 0x422846
call fcn.00402830
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov ecx, dword [edi + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [edi + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
call fcn.004aa2fa
add esp, 0x10
mov ecx, dword [ebp - 0x140]
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x42288e
mov edx, dword [ebp - 0x134]
push edx
mov ecx, dword [edx]
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0x10
mov dword [ebp - 0x130], esi
jmp 0x4228ae
push dword [edx - 0xc]
lea ecx, [ebp - 0x130]
push edx
call fcn.00402690
mov esi, dword [ebp - 0x130]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x138]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x422ddd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x422ddd
mov eax, dword [ebp - 0x134]
push 0
push 0
push 3
push 0
push 0
push SysReAllocStringLen
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x140], eax
cmp eax, 0xffffffff
jne 0x4229a0
lea ecx, [ebp - 0x140]
call fcn.004216d0
mov byte [ebp - 4], 7
mov edx, dword [eax]
lea edi, [esi - 0x10]
lea ecx, [edx - 0x10]
cmp ecx, edi
je 0x422974
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x42295f
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x42295f
call fcn.004027c0
mov dword [ebp - 0x138], eax
mov eax, ebx
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x42294e
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x138]
add esi, 0x10
mov dword [ebp - 0x130], esi
jmp 0x422974
push dword [edx - 0xc]
lea ecx, [ebp - 0x130]
push edx
call fcn.00402690
mov esi, dword [ebp - 0x130]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x140]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x422ddd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x422ddd
lea ecx, [ebp - 0x158]
push ecx
xorps xmm0, xmm0
push eax
movq qword [ebp - 0x158], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x422a5b
lea ecx, [ebp - 0x134]
call fcn.004216d0
mov byte [ebp - 4], 9
mov edx, dword [eax]
lea edi, [esi - 0x10]
lea ecx, [edx - 0x10]
cmp ecx, edi
je 0x422a2f
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x422a1a
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x422a1a
call fcn.004027c0
mov dword [ebp - 0x138], eax
mov eax, ebx
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x422a09
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x138]
add esi, 0x10
mov dword [ebp - 0x130], esi
jmp 0x422a2f
push dword [edx - 0xc]
lea ecx, [ebp - 0x130]
push edx
call fcn.00402690
mov esi, dword [ebp - 0x130]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x134]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x422dd1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x422dd1
cmp dword [ebp - 0x154], 0
je 0x422ad7
lea ecx, [ebp - 0x134]
call fcn.004216d0
mov byte [ebp - 4], 0xb
mov edx, dword [eax]
lea edi, [esi - 0x10]
lea ecx, [edx - 0x10]
cmp ecx, edi
je 0x422ad2
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x422abd
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x422abd
call fcn.004027c0
mov dword [ebp - 0x138], eax
mov eax, ebx
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x422aac
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x138]
add esi, 0x10
mov dword [ebp - 0x130], esi
jmp 0x422ad2
push dword [edx - 0xc]
lea ecx, [ebp - 0x130]
push edx
call fcn.00402690
mov esi, dword [ebp - 0x130]
jmp 0x422a2f
cmp dword [ebp - 0x158], 0
je 0x422dd1
mov dword [ebp - 0x14c], 0
mov dword [ebp - 0x148], 0
mov dword [ebp - 0x144], 0
mov byte [ebp - 4], 0xd
push dword [ebp - 0x158]
lea ecx, [ebp - 0x14c]
call fcn.00423110
mov ebx, dword [ebp - 0x14c]
push 0
lea eax, [ebp - 0x160]
push eax
push dword [ebp - 0x158]
mov dword [ebp - 0x160], 0
push ebx
push dword [ebp - 0x140]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x422d9f
lea eax, [ebp - 0x134]
push eax
lea eax, [ebp - 0x139]
push eax
lea edx, [ebp - 0x129]
mov ecx, ebx
mov byte [ebp - 0x129], 0
mov byte [ebp - 0x139], 0
mov dword [ebp - 0x134], 0
call fcn.004210f0
mov eax, dword [ebp - 0x134]
mov edi, dword [ebp - 0x148]
add esp, 8
test eax, eax
jle 0x422bb4
add eax, ebx
cmp eax, edi
jne 0x422b9b
mov edi, ebx
jmp 0x422bae
cmp ebx, eax
je 0x422bb4
sub edi, eax
push edi
push eax
push ebx
call fcn.004a9940
add esp, 0xc
add edi, ebx
mov dword [ebp - 0x148], edi
cmp byte [ebp - 0x139], 0
je 0x422bda
mov ecx, ebx
cmp ebx, edi
je 0x422bda
mov dl, byte [ecx]
mov bl, byte [ecx + 1]
mov byte [ecx + 1], dl
mov byte [ecx], bl
add ecx, 2
cmp ecx, edi
jne 0x422bc3
mov ebx, dword [ebp - 0x14c]
sub edi, ebx
cmp byte [ebx + edi - 1], 0
je 0x422c22
inc edi
push edi
lea ecx, [ebp - 0x14c]
call fcn.00423110
cmp byte [ebp - 0x129], 0
mov ebx, dword [ebp - 0x14c]
mov byte [ebx + edi - 1], 0
je 0x422ce7
inc edi
push edi
lea ecx, [ebp - 0x14c]
call fcn.00423110
mov ebx, dword [ebp - 0x14c]
mov byte [ebx + edi - 1], 0
jmp 0x422c4a
cmp byte [ebp - 0x129], 0
je 0x422ce7
lea eax, [edi + 2]
push eax
lea ecx, [ebp - 0x14c]
call fcn.00423110
mov ebx, dword [ebp - 0x14c]
mov word [ebx + edi], 0
push ebx
lea ecx, [ebp - 0x134]
call fcn.004024a0
mov byte [ebp - 4], 0xe
mov edx, dword [eax]
lea edi, [esi - 0x10]
lea ecx, [edx - 0x10]
cmp ecx, edi
je 0x422cba
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x422ca5
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x422ca5
call fcn.004027c0
mov dword [ebp - 0x138], eax
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x422c94
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x138]
add esi, 0x10
mov dword [ebp - 0x130], esi
jmp 0x422cba
push dword [edx - 0xc]
lea ecx, [ebp - 0x130]
push edx
call fcn.00402690
mov esi, dword [ebp - 0x130]
mov byte [ebp - 4], 0xd
mov edx, dword [ebp - 0x134]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x422d9f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x422d9f
mov eax, dword [0x52c6d8]
mov ecx, 0x52c6d8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x134], eax
mov byte [ebp - 4], 0x10
push ebx
lea ecx, [ebp - 0x134]
call fcn.00403540
mov byte [ebp - 4], 0x11
mov eax, dword [ebp - 0x134]
add esi, 0xfffffff0
lea edi, [eax - 0x10]
cmp edi, esi
je 0x422d71
cmp dword [esi + 0xc], 0
jl 0x422d62
mov ecx, dword [edi]
cmp ecx, dword [esi]
jne 0x422d62
mov ecx, edi
call fcn.004027c0
mov dword [ebp - 0x138], eax
or eax, 0xffffffff
lea ecx, [esi + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x422d51
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x138]
add eax, 0x10
mov dword [ebp - 0x130], eax
jmp 0x422d71
push dword [eax - 0xc]
lea ecx, [ebp - 0x130]
push eax
call fcn.00402690
mov byte [ebp - 4], 0xd
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x422d8c
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [ebp - 0x130]
mov ecx, edx
call fcn.00420d70
mov esi, dword [ebp - 0x130]
mov byte [ebp - 4], 2
test ebx, ebx
je 0x422dce
push ebx
call fcn.004a9925
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x148], 0
mov dword [ebp - 0x14c], 0
add esp, 4
or ebx, 0xffffffff
push dword [ebp - 0x140]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi - 0x10]
add esi, 0xfffffff0
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
mov ecx, eax
lea eax, [esi + 0xc]
jl 0x422e04
cmp ecx, dword [esi]
jne 0x422e04
mov edi, esi
mov ecx, 1
lock xadd dword [eax], ecx
jmp 0x422e41
mov eax, dword [ecx]
push 2
push dword [esi + 4]
call dword [eax]
mov edi, eax
test edi, edi
jne 0x422e18
call fcn.00402830
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov ecx, dword [esi + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [edi + 0x10]
push eax
call fcn.004aa2fa
add esp, 0x10
lea eax, [edi + 0x10]
mov edi, dword [ebp - 0x15c]
mov dword [edi], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x150]
or ecx, 2
mov dword [ebp - 0x150], ecx
mov dword [ebp - 4], 0
lea eax, [esi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x422e7a
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a992a
mov esp, ebp
pop ebp
ret