Function at 0x645c30
Capabilities:
Check if file exists
Extract resource via kernel32 functions
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6954ea
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x74f330]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi]
mov edx, dword [eax + 0x58]
call edx
mov edx, dword [ebp + 8]
lea ebx, [esi + 0x30]
test edx, edx
jne 0x645c6f
xor eax, eax
jmp 0x645c7d
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x645c74
sub eax, edi
push eax
push edx
mov ecx, ebx
call fcn.004017d9
mov ecx, dword [ebp + 0xc]
lea edi, [esi + 0x34]
test ecx, ecx
jne 0x645c94
xor eax, eax
jmp 0x645caa
mov eax, ecx
lea edx, [eax + 1]
mov dword [ebp + 0xc], edx
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x645ca0
sub eax, dword [ebp + 0xc]
push eax
push ecx
mov ecx, edi
call fcn.004017d9
mov ecx, dword [esi + 0x2c]
test ecx, ecx
jne 0x645de7
mov eax, dword [ebx]
cmp dword [eax - 0xc], ecx
je 0x645d7e
push 0x5c
lea ecx, [ebp - 0x10]
push ebx
push ecx
call fcn.00645730
push edi
push eax
lea edx, [ebp + 0xc]
xor ebx, ebx
push edx
mov dword [ebp - 4], ebx
call fcn.00405b5e
add esp, 0x18
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x645d0b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [edi]
cmp dword [ecx - 0xc], ebx
je 0x645da1
mov edx, dword [ebp + 0xc]
push edx
call dword [0x69b370]
cmp eax, 0xffffffff
je 0x645da1
test al, 0x10
jne 0x645da1
push 0x18
call fcn.004b70c2
add esp, 4
mov dword [ebp + 8], eax
mov byte [ebp - 4], 3
cmp eax, ebx
je 0x645d47
mov ecx, eax
call fcn.004e729e
jmp 0x645d49
xor eax, eax
mov ecx, dword [ebp + 0xc]
push ebx
mov dword [esi + 0x3c], eax
mov edx, dword [eax]
mov edx, dword [edx + 0x24]
push ebx
push ecx
mov ecx, eax
mov byte [ebp - 4], 2
call edx
test eax, eax
jne 0x645d94
mov ecx, dword [esi + 0x3c]
cmp ecx, ebx
je 0x645d76
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push 1
call edx
mov dword [esi + 0x3c], ebx
lea ecx, [ebp + 0xc]
call fcn.004b5f53
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 8
lea ecx, [ebp + 0xc]
call fcn.004b5f53
jmp 0x645f30
mov ebx, dword [ebp + 8]
push ebx
call dword [0x69b36c]
mov dword [esi + 0x28], eax
test eax, eax
jne 0x645dbf
push 2
push eax
push ebx
call dword [0x69b5ac]
mov dword [esi + 0x28], eax
mov eax, dword [ebp + 0xc]
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 0x645df5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x645df5
mov edx, dword [edi]
mov eax, dword [edx - 0xc]
neg eax
sbb eax, eax
and eax, ecx
mov dword [esi + 0x28], eax
cmp dword [esi + 0x28], 0
je 0x645d7e
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
jne 0x645e43
lea ecx, [ebp - 0x14]
push ecx
mov ecx, esi
call fcn.00645b20
push eax
mov ecx, edi
mov dword [ebp - 4], 4
call fcn.0040191c
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x645e43
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.0040149c
add eax, 0x10
add esp, 4
mov dword [ebp + 8], eax
push 0x5f
push 0x2e
lea ecx, [ebp + 8]
mov dword [ebp - 4], 5
call fcn.00645640
push 0x5f
push 0x5c
lea ecx, [ebp + 8]
call fcn.00645640
mov ebx, dword [ebp + 8]
mov ecx, dword [esi + 0x28]
push str.TEXTFILE
push ebx
push ecx
call dword [0x69b4b0]
mov edi, eax
test edi, edi
jne 0x645ec8
add ebx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [ebx + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x645eb2
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
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 8
mov ecx, dword [esi + 0x28]
push edi
push ecx
call dword [0x69b338]
test eax, eax
je 0x645e8f
push eax
call dword [0x69b334]
mov ecx, dword [esi + 0x28]
push edi
push ecx
mov dword [esi + 0x20], eax
mov ebx, eax
call dword [0x69b330]
shr eax, 1
lea edx, [ebx + eax*2]
mov dword [esi + 0x24], edx
test ebx, ebx
je 0x645f0a
mov eax, 0xfeff
cmp word [ebx], ax
jne 0x645f0a
add ebx, 2
mov dword [esi + 0x20], ebx
mov eax, dword [ebp + 8]
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 0x645f30
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 8