Function at 0x542240
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x622fa0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x344
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
xor ebx, ebx
mov dword [ebp - 0x10], esp
push ebx
push ebx
push 3
push ebx
push 1
mov esi, ecx
push bind
push edi
mov dword [ebp - 0x40], esi
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
jne 0x5422ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
lea eax, [ebp - 0x250]
push 0x6d8608
push eax
call fcn.005deb38
add esp, 0x10
lea ecx, [ebp - 0x250]
push ecx
mov ecx, esi
call fcn.0053cb80
mov eax, 0x7535
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
lea edx, [ebp - 0x44]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x28], eax
jne 0x54234a
test ebx, ebx
jne 0x54234a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x54234a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea eax, [ebp - 0x250]
push edi
push 0x6d89a4
push eax
call fcn.005deb38
add esp, 0xc
lea ecx, [ebp - 0x250]
push ecx
mov ecx, esi
call fcn.0053cb80
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x6eda14]
mov ecx, dword [esi + 0xd4]
push eax
call fcn.0054f740
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp - 0x44]
push 1
push 0
push 0
push ecx
call fcn.005e09d0
mov ecx, dword [ebp - 0x28]
add ecx, eax
adc ebx, edx
lea edx, [ebp - 0x250]
push ebx
push ecx
push edi
push 0x6d898c
push edx
mov dword [ebp - 0x28], ecx
call fcn.005deb38
add esp, 0x14
lea eax, [ebp - 0x250]
mov ecx, esi
push eax
call fcn.0053cb80
mov edi, dword [ebp - 0x28]
mov ecx, edi
or ecx, ebx
jne 0x5423bf
push 0x6d8ca8
mov ecx, esi
call fcn.0053cb80
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x757c
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
xor eax, eax
cmp eax, ebx
jl 0x5423fa
jg 0x5423cc
cmp dword [ebp + 0x14], edi
jb 0x5423fa
push 0x6d8c94
mov ecx, esi
call fcn.0053cb80
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x757c
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp + 0x10]
push ecx
lea ecx, [ebp - 0x14]
call fcn.005fa919
mov edx, dword [ebp - 0x14]
mov ecx, esi
push edx
push ebx
push edi
mov byte [ebp - 4], 1
call fcn.00545e10
xor ecx, ecx
cmp eax, ecx
je 0x542483
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x6ed874]
push eax
lea edx, [ebp - 0x350]
push ecx
push edx
call fcn.005deb38
mov ecx, dword [esi + 0xd4]
add esp, 0xc
lea eax, [ebp - 0x350]
push eax
call fcn.0054f740
push 0x6d8c6c
mov ecx, esi
call fcn.0053cb80
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.005fa859
mov eax, 0x755f
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp ebx, ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
jg 0x54249c
jl 0x542497
cmp edi, 0x600000
jae 0x54249c
mov dword [ebp + 0x10], edi
jmp 0x5424a3
mov dword [ebp + 0x10], 0x600000
mov edx, dword [ebp + 0x10]
push edx
call fcn.005de9fe
mov edi, eax
add esp, 4
test edi, edi
mov dword [ebp - 0x2c], edi
jne 0x54256a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x250]
push 0x6d8c44
push eax
call fcn.005deb38
add esp, 0xc
lea ecx, [ebp - 0x250]
push ecx
mov ecx, esi
call fcn.0053cb80
mov eax, 0xaaaaaaab
mul dword [ebp + 0x10]
shr edx, 1
mov eax, edx
push eax
mov dword [ebp + 0x10], eax
call fcn.005de9fe
add esp, 4
test eax, eax
jne 0x54256a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0x250]
push 0x6d8c44
push edx
call fcn.005deb38
add esp, 0xc
lea eax, [ebp - 0x250]
mov ecx, esi
push eax
call fcn.0053cb80
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x6eda10]
mov ecx, dword [esi + 0xd4]
push edx
call fcn.0054f740
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.005fa859
mov eax, 0x7564
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0x14]
test eax, eax
jbe 0x54258b
push 0
push 0
push eax
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp + 0x14]
xor eax, eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x18]
xor ecx, ecx
cmp eax, ecx
je 0x5425a5
mov dl, byte [eax + 0xc]
test dl, dl
jne 0x5425a5
mov byte [esi + 0x65], 1
mov dword [esi + 0x60], ecx
mov byte [esi + 0x66], cl
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x20]
push 0
push edx
push eax
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5427e5
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x5427e5
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x34], 0
test eax, eax
je 0x542616
mov edx, dword [eax + 0x3c]
test edx, edx
jne 0x542616
lea edx, [ebp - 0x3c]
lea eax, [ebp - 0x34]
push edx
lea ecx, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x20]
push ecx
mov ecx, dword [ebp - 0x1c]
push edx
mov edx, dword [ebp - 0x28]
push eax
mov eax, dword [ebp + 8]
push ecx
push ebx
push edx
push edi
push eax
mov ecx, esi
call fcn.00541ca0
jmp 0x542628
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x30]
push 0
push edx
push ecx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x542722
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x20]
cmp eax, ecx
jne 0x542722
mov edx, dword [ebp - 0x1c]
xor eax, eax
add edx, ecx
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x18]
adc edx, eax
mov dword [ebp - 0x18], edx
mov edx, dword [esi + 0x100]
add edx, ecx
mov dword [esi + 0x100], edx
mov ecx, dword [esi + 0x104]
adc ecx, eax
mov eax, dword [esi + 0x18]
test eax, eax
mov dword [esi + 0x104], ecx
je 0x5426a1
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x5426a1
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x38]
mov edi, eax
or edi, ecx
je 0x542698
cmp ecx, ebx
jg 0x542698
jl 0x542691
cmp eax, dword [ebp - 0x28]
jae 0x542698
mov dword [ebp - 0x28], eax
mov ebx, ecx
jmp 0x54269e
sub dword [ebp - 0x28], edx
sbb ebx, 0
mov edi, dword [ebp - 0x2c]
mov eax, dword [esi + 0xd8]
cmp dword [eax], 0
je 0x5426d5
mov ecx, dword [esi + 0x100]
mov edx, dword [esi + 0x104]
mov dword [ebp - 0x4c], ecx
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x48], edx
mov edx, dword [eax]
push ecx
push 0x147b
push 0x111
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
cmp dword [ebp - 0x18], ebx
jl 0x5425ae
jg 0x5426ee
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x1c]
cmp ecx, eax
jb 0x5425ae
push edi
call fcn.005ddf8a
mov ecx, dword [ebp + 0xc]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.005fa859
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea edx, [ebp - 0x250]
push edi
push 0x6d8c2c
push edx
call fcn.005deb38
add esp, 0xc
lea eax, [ebp - 0x250]
mov ecx, esi
push eax
call fcn.0053cb80
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.005ddf8a
mov edx, dword [ebp + 0xc]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x6e7b6c]
mov dword [ebp + 0x14], eax
push 0
lea ecx, [ebp + 8]
push 0
push ecx
push 0x400
push edi
push 0
push 0x1100
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, dword [ebp + 8]
lea eax, [ebp + 0x14]
push edx
push 0x6bc090
push eax
call fcn.005f368b
mov ecx, dword [ebp + 8]
add esp, 0xc
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp + 0x14]
mov ecx, dword [esi + 0xd4]
push edx
call fcn.0054f740
lea ecx, [ebp + 0x14]
mov byte [ebp - 4], 1
call fcn.005fa859
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.005fa859
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea eax, [ebp - 0x250]
push ebx
push 0x6d8c14
push eax
call fcn.005deb38
add esp, 0xc
lea ecx, [ebp - 0x250]
push ecx
mov ecx, esi
call fcn.0053cb80
push edi
call fcn.005ddf8a
mov edx, dword [ebp + 0xc]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x6eda08]
mov ecx, dword [esi + 0xd4]
push eax
call fcn.0054f740
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.005fa859
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10