Function at 0x406770
Capabilities:
Get file size

Disassembly:
push 0xffffffffffffffff
push 0x44a278
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push edi
mov eax, dword [0x45d740]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
xor ebp, ebp
cmp dword [esi + 0xc8], ebp
je 0x4069b4
mov eax, dword [esi + 0x294]
sub eax, 0x10
push eax
call fcn.00402220
add eax, 0x10
add esp, 4
mov dword [esp + 0x14], eax
push ebp
push ebp
mov dword [esp + 0x30], ebp
mov eax, dword [esi + 0x818]
push 0x1042
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40687c
lea ebx, [esi + 0x7f8]
push edi
mov ecx, ebx
call fcn.004107ff
cmp eax, 1
jne 0x40687c
push ebp
push edi
lea ecx, [esp + 0x18]
push ecx
mov ecx, ebx
call fcn.00410db0
push 0x452254
push eax
lea edx, [esp + 0x20]
push edx
mov byte [esp + 0x34], 1
call fcn.0040a540
add esp, 0xc
mov byte [esp + 0x28], 2
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.0040a7c0
mov byte [esp + 0x28], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406857
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x28], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40687c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esi + 0x84]
mov ecx, dword [ecx - 0xc]
cmp ecx, ebp
lea eax, [esi + 0x84]
je 0x4068dc
push 0x452254
push eax
lea edx, [esp + 0x20]
push edx
call fcn.0040a540
add esp, 0xc
mov byte [esp + 0x28], 3
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.0040a7c0
mov byte [esp + 0x28], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4068dc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi + 0xc0]
add eax, 8
lea edi, [esi + 0x88]
push eax
mov ecx, edi
call fcn.00402080
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.00402220
add eax, 0x10
add esp, 4
mov dword [esp + 0x10], eax
mov byte [esp + 0x28], 4
mov ebx, dword [esp + 0x14]
mov eax, dword [esi + 0x6b0]
push ebx
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.0040a100
lea edx, [esp + 0x10]
lea ecx, [esi + 0x7c]
push edx
call fcn.00402080
mov eax, dword [edi]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
or eax, ecx
jge 0x40694c
push ebp
mov ecx, edi
call fcn.004023a0
mov edi, dword [edi]
push ebp
push 0x80
push 3
push ebp
push 1
push SysReAllocStringLen
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4069c9
mov byte [esp + 0x28], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406990
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov dword [esp + 0x28], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4069b4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
add esp, 0x1c
ret
lea ecx, [esp + 0x1c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push edi
mov dword [esi + 0x90], ebx
mov dword [esi + 0x94], ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [esp + 0x10]
mov eax, dword [ebp - 0xc]
add eax, 0xa
push eax
push 0x40
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, dword [esp + 0x18]
push edx
mov edi, eax
push 0
push edi
call fcn.00435f30
mov byte [edi], 4
mov eax, dword [esp + 0x28]
mov dword [edi + 1], eax
mov dword [edi + 5], ebx
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
mov eax, 1
sub eax, dword [ebp - 4]
add esp, 0xc
or ecx, eax
jge 0x406a41
push 0
lea ecx, [esp + 0x14]
call fcn.004023a0
mov ebp, dword [esp + 0x10]
add ebx, 1
push ebx
lea ecx, [edi + 9]
push ebp
push ecx
call fcn.00438d50
mov eax, dword [esi + 0x8a0]
add esp, 0xc
test eax, eax
je 0x406a67
mov edx, dword [esp + 0x18]
push edx
push edi
call eax
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [esp + 0x18]
push eax
lea ecx, [esi + 0xbc]
call fcn.0040a840
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406a9e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebp, 0xfffffff0
mov byte [esp + 0x28], 0
lea ecx, [ebp + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406ac0
mov ecx, dword [ebp]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebp
call edx
mov dword [esp + 0x28], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406ae8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
add esp, 0x1c
ret