Function at 0x406690
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x540208
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x5a38c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0xe8], 0
je 0x4068ee
mov eax, dword [esi + 0x2fc]
sub eax, 0x10
push eax
call fcn.00402f50
add eax, 0x10
add esp, 4
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x960]
push 0
push 0
push 0x1042
push eax
mov dword [ebp - 4], 0
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40679d
push edi
lea ecx, [esi + 0x940]
call fcn.0043583d
cmp eax, 1
jne 0x40679d
push 0
push edi
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [esi + 0x940]
call fcn.00436337
push 0x551828
push eax
lea edx, [ebp - 0x18]
push edx
mov byte [ebp - 4], 1
call fcn.00403df0
add esp, 0xc
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.004036e0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40677a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40679d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esi + 0xa4]
mov ecx, dword [ecx - 0xc]
lea eax, [esi + 0xa4]
test ecx, ecx
je 0x4067f8
push 0x551828
push eax
lea edx, [ebp - 0x18]
push edx
call fcn.00403df0
add esp, 0xc
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.004036e0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4067f8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi + 0xdc]
mov dword [ebp - 0x24], eax
mov eax, dword [eax + 4]
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x406814
call fcn.00427fd7
add eax, 8
push eax
lea ecx, [esi + 0xa8]
call fcn.00403f10
mov eax, dword [esi + 0xa8]
sub eax, 0x10
push eax
call fcn.00402f50
add eax, 0x10
add esp, 4
mov dword [ebp - 0x10], eax
mov ebx, dword [ebp - 0x14]
mov eax, dword [esi + 0x720]
push ebx
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.00403840
lea edx, [ebp - 0x10]
lea ecx, [esi + 0x9c]
push edx
call fcn.00403f10
mov eax, dword [esi + 0xa8]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
or eax, ecx
jge 0x406883
push 0
lea ecx, [esi + 0xa8]
call fcn.004011e0
mov edi, dword [esi + 0xa8]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x406902
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4068cb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4068ee
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x1c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov dword [ebp - 0x20], eax
mov dword [esi + 0xb0], eax
mov dword [esi + 0xb4], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebx - 0xc]
add eax, 0xa
push eax
push 0x40
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, dword [ebp - 0x18]
push edx
mov edi, eax
push 0
push edi
call fcn.00527530
mov ecx, dword [ebp - 0x20]
mov byte [edi], 4
mov eax, dword [ebp - 0x1c]
mov dword [edi + 1], eax
mov dword [edi + 5], ecx
mov ecx, dword [ebx - 8]
mov edx, dword [ebx - 0xc]
mov eax, 1
sub eax, dword [ebx - 4]
add esp, 0xc
or ecx, eax
mov dword [ebp - 0x20], edx
jge 0x40697e
push 0
lea ecx, [ebp - 0x10]
call fcn.004011e0
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x20]
inc eax
push eax
lea ecx, [edi + 9]
push ebx
push ecx
call fcn.005280b0
mov edx, dword [ebp - 0x18]
mov eax, dword [esi + 0x70c]
mov ecx, dword [esi + 0x710]
add esp, 0xc
push edx
push edi
push eax
call fcn.0040e0f0
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea ecx, [ebp - 0x24]
push ecx
mov ecx, dword [ebp - 0x24]
call fcn.004043b0
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4069d9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebx, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4069f9
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406a1f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret