Function at 0x506e60
Capabilities:
Get file size
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5bfb03
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x22c
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x70], esi
mov eax, dword [esi + 0x74]
test eax, eax
je 0x5070f2
mov eax, dword [esi + 0x2c]
lea ecx, [ebp - 0x1f8]
inc eax
mov dword [ebp - 4], 0
push eax
push 0x668520
push ecx
call fcn.0057f2ea
add esp, 0xc
lea edx, [ebp - 0x1f8]
mov ecx, esi
push edx
call fcn.00502040
mov eax, dword [esi + 0x2c]
lea ecx, [ebp - 0x48]
inc eax
mov dword [ebp - 0x5c], 0x10
push eax
push 0x64eff4
push ecx
call fcn.0057f2ea
add esp, 0xc
lea edx, [ebp - 0x5c]
lea eax, [ebp - 0x40]
lea ecx, [ebp - 0x48]
push edx
mov edx, dword [esi + 0x74]
push eax
push 0
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x5070f2
mov eax, dword [ebp - 0x3c]
push 0x50
mov dword [ebp - 0x58], eax
call fcn.005970d9
mov ecx, eax
add esp, 4
mov dword [ebp - 0x14], ecx
test ecx, ecx
mov byte [ebp - 4], 1
je 0x506f27
call fcn.005084d0
mov edi, eax
jmp 0x506f29
xor edi, edi
test edi, edi
mov dword [ebp - 0x1c], edi
mov byte [ebp - 4], 0
je 0x5070f2
mov ecx, dword [esi + 0x6c]
mov dword [edi + 0x44], ecx
mov edx, dword [esi + 0x74]
mov dword [edi + 0x48], edx
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0x10]
push ecx
call fcn.0057e90a
lea edx, [eax + eax + 0x14]
push edx
call fcn.005970d9
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [ebp - 0x18], ebx
jne 0x506f73
mov ecx, edi
call fcn.00508510
push edi
jmp 0x5070ea
mov edx, dword [esi + 0x2c]
mov ecx, dword [esi + 0x30]
inc edx
mov eax, edx
mov dword [esi + 0x2c], edx
cmp ecx, eax
jge 0x506f86
mov dword [esi + 0x30], eax
mov dword [edi + 0x40], eax
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x2c]
mov edx, dword [ecx + 0x10]
push eax
push edx
push 0x667914
push ebx
call fcn.0057f81e
add esp, 0x10
mov ecx, edi
push ebx
call fcn.005085a0
test eax, eax
jne 0x5070d9
push eax
push eax
push 3
push eax
push 1
push closesocket
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x50706a
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x74]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov dword [ebp - 0x20], 0
cmp ebx, 0xffffffff
jne 0x50702b
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x50702b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x50702b
push eax
lea edx, [ebp - 0x1f8]
push 0x6679fc
push edx
call fcn.0057f2ea
add esp, 0xc
lea eax, [ebp - 0x1f8]
mov ecx, esi
push eax
call fcn.00502040
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
jmp 0x507047
mov ecx, dword [ebp - 0x74]
push 1
push 0
push 0
push ecx
call fcn.00581190
add ebx, eax
mov eax, dword [ebp - 0x20]
adc eax, edx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or ebx, dword [ebp - 0x20]
je 0x50709c
mov ebx, dword [ebp + 8]
mov edx, dword [ebp - 0x18]
push edx
lea ecx, [ebx + 0x10]
mov dword [ebp - 0x14], ecx
call fcn.0050c300
jmp 0x5070ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
lea eax, [ebp - 0x1f8]
push 0x6684ec
push eax
call fcn.0057f2ea
add esp, 0x10
lea ecx, [ebp - 0x1f8]
push ecx
mov ecx, esi
call fcn.00502040
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x18]
push eax
lea ecx, [ebx + 0x10]
mov dword [ebp - 0x14], ecx
call fcn.0050c2b0
test eax, eax
je 0x507107
mov ebx, dword [ebp - 0x18]
push eax
push ebx
lea ecx, [ebp - 0x1f8]
push 0x6677b8
push ecx
call fcn.0057f2ea
add esp, 0x10
lea edx, [ebp - 0x1f8]
mov ecx, esi
push edx
call fcn.00502040
mov ecx, edi
call fcn.00508510
push edi
call fcn.00597102
add esp, 4
push ebx
call fcn.00597102
add esp, 4
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 4
mov dword [edi], ebx
mov eax, dword [ebx + 0x80]
cmp dword [eax + 0x24], 4
jne 0x507134
mov ecx, dword [ebp - 0x38]
mov dword [edi + 0x1c], ecx
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x20]
mov edx, eax
mov dword [edi + 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x24], ecx
sar edx, 0x1f
jmp 0x50714a
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
add edx, eax
mov eax, dword [ebp - 0x34]
mov dword [ebx + 0x20], edx
adc eax, ecx
mov dword [ebx + 0x24], eax
mov eax, dword [ebp - 0x3c]
cmp eax, 0xffffffff
jne 0x5071f9
mov ecx, dword [esi + 0x30]
mov dword [esi + 0x64], 0
mov dword [esi + 0x2c], ecx
mov edx, dword [ebx + 0x80]
mov byte [ebp + 0xb], 0
cmp dword [edx + 0x24], 4
jne 0x5071b7
mov eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x2c]
push eax
push 0x655478
push ecx
call fcn.0057f2ea
add esp, 0xc
lea edx, [ebp - 0x1c]
lea eax, [ebp - 0x6c]
lea ecx, [ebp - 0x2c]
push edx
mov edx, dword [esi + 0x74]
push eax
push 0
push 0
push ecx
push edx
mov dword [ebp - 0x1c], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x5071b7
cmp dword [ebp - 0x64], 0xffffffff
jne 0x5071b7
mov byte [ebp + 0xb], 1
mov eax, dword [esi + 0x20]
mov edx, dword [ebx + 0x20]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x18]
cmp edx, eax
mov ecx, dword [ecx + 0x1c]
jne 0x5071d0
mov edx, dword [ebx + 0x24]
cmp edx, ecx
je 0x5071e8
mov dl, byte [ebp + 0xb]
test dl, dl
jne 0x5071e8
sub eax, 1
sbb ecx, 0
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x34], ecx
jmp 0x5074aa
push 0x6684d0
mov ecx, esi
call fcn.00502040
jmp 0x50727e
push eax
lea ecx, [ebp - 0x48]
push 0x64eff4
push ecx
call fcn.0057f2ea
add esp, 0xc
lea edx, [ebp - 0x5c]
lea eax, [ebp - 0x40]
lea ecx, [ebp - 0x48]
push edx
mov edx, dword [esi + 0x74]
push eax
push 0
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x5072b6
push eax
lea eax, [ebp - 0x1f8]
push 0x6684b4
push eax
call fcn.0057f2ea
add esp, 0xc
lea ecx, [ebp - 0x1f8]
push ecx
mov ecx, esi
call fcn.00502040
mov edx, dword [esi + 0x30]
mov eax, dword [esi + 0x20]
mov dword [esi + 0x64], 0
mov dword [esi + 0x2c], edx
mov ecx, dword [eax]
mov edx, dword [ebx + 0x20]
mov eax, dword [ecx + 0x18]
cmp edx, eax
mov ecx, dword [ecx + 0x1c]
jne 0x5071d7
mov edx, dword [ebx + 0x24]
cmp edx, ecx
jne 0x5071d7
mov eax, dword [ebp - 0x18]
push eax
call fcn.00597102
mov ecx, dword [esi + 0x24]
add esp, 4
mov edx, dword [ecx + 0x38]
mov ecx, dword [ebp - 0x14]
mov dword [edi + 0x38], edx
mov eax, dword [esi + 0x24]
mov dword [eax + 0x38], edi
mov dword [esi + 0x24], edi
mov dword [edi + 0x14], 1
call fcn.0050c290
mov dword [edi], 0
jmp 0x5070f2
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
mov ecx, eax
sub ecx, 1
mov dword [ebx + 0x30], ecx
mov ecx, dword [ebp - 0x40]
sbb edx, 0
dec ecx
mov dword [ebx + 0x34], edx
mov dword [esi + 0x2c], ecx
mov edx, dword [ebx + 0x80]
cmp dword [edx + 0x24], 4
jne 0x5074aa
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x40]
mov dword [edi + 0x28], eax
mov edx, dword [ebp - 0x40]
lea ecx, [ebp - 0x238]
push 0xa
push ecx
push edx
call fcn.0057ff82
mov ecx, dword [esi + 0x20]
mov edx, 0x64f030
add esp, 0xc
mov dword [ebp - 0x14], eax
mov ecx, dword [ecx + 0x10]
test edx, edx
mov dword [ebp + 8], ecx
je 0x5074aa
test ecx, ecx
je 0x5074aa
test eax, eax
je 0x5074aa
xor eax, eax
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], eax
mov word [ebp - 0x2c], ax
call fcn.00401070
mov edi, 0x64f030
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x507390
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push eax
push eax
push 0xffffffffffffffff
push 0x64f030
push eax
push eax
call edi
test eax, eax
mov dword [ebp - 0x28], eax
je 0x507390
lea eax, [eax + eax + 2]
push eax
call fcn.005970d9
add esp, 4
mov dword [ebp - 0x30], eax
test eax, eax
je 0x507390
mov ecx, dword [ebp - 0x28]
push ecx
push eax
push 0xffffffffffffffff
push 0x64f030
push 0
push 0
call edi
mov dword [ebp - 0x28], eax
xor edi, edi
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x68]
push edx
mov byte [ebp - 4], 2
mov dword [ebp - 0x68], edi
mov dword [ebp - 0x60], edi
mov word [ebp - 0x64], di
call fcn.00401fc0
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x54]
push eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x4c], edi
mov word [ebp - 0x50], di
call fcn.00401fc0
mov ecx, dword [ebp - 0x1c]
mov byte [ebp - 4], 4
add ecx, 0x2c
call fcn.00401070
mov eax, dword [ebp - 0x68]
cmp eax, edi
jne 0x5073df
lea eax, [ebp - 0x64]
mov ecx, dword [ebp - 0x54]
cmp ecx, edi
mov edi, ecx
jne 0x5073eb
lea edi, [ebp - 0x50]
mov edx, dword [ebp - 0x28]
push eax
mov dword [ebp + 8], edx
call fcn.0057e90a
mov edx, eax
push edi
mov dword [ebp - 0x14], edx
call fcn.0057e90a
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
add ecx, edx
lea eax, [eax + ecx + 3]
mov dword [ebp + 8], eax
lea edi, [eax + eax]
push edi
call fcn.005970d9
mov edx, eax
mov eax, dword [ebp - 0x1c]
add eax, 0x2c
add esp, 0xc
test edx, edx
mov dword [eax], edx
je 0x507483
mov ecx, edi
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0x54]
test eax, eax
mov edx, eax
jne 0x50744b
lea edx, [ebp - 0x50]
mov ecx, dword [ebp - 0x68]
test ecx, ecx
jne 0x507455
lea ecx, [ebp - 0x64]
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x50745f
lea eax, [ebp - 0x2c]
push edx
push ecx
mov ecx, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp + 8]
mov edx, dword [ecx + 0x2c]
lea edi, [ecx + 0x2c]
push eax
push edx
call fcn.0057e89a
mov eax, dword [edi]
push eax
call fcn.0057e90a
add esp, 0x18
mov dword [edi + 8], eax
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 3
call fcn.00401070
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 2
call fcn.00401070
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.00401070
mov edi, dword [ebp - 0x1c]
xor eax, eax
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], eax
mov ecx, dword [edi + 0x20]
mov eax, dword [ebx + 0x64]
mov edx, dword [edi + 0x1c]
push ecx
mov ecx, dword [eax + 4]
push edx
push ecx
mov ecx, dword [ebx + 0x30]
mov edx, dword [eax]
mov eax, dword [ebx + 0x34]
push edx
mov edx, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x24]
push ecx
mov ecx, dword [ebp - 0x18]
push edx
mov edx, dword [edi]
push eax
push ecx
mov eax, dword [edx + 0x24]
push eax
lea eax, [ebp - 0x1f8]
mov ecx, dword [edx + 0x20]
mov edx, dword [edi + 0x40]
push ecx
push edx
push 0x668448
push eax
call fcn.0057f2ea
add esp, 0x38
lea ecx, [ebp - 0x1f8]
push ecx
mov ecx, esi
call fcn.00502040
mov edx, dword [ebp - 0x18]
push edx
call fcn.00597102
mov eax, dword [esi + 0x24]
add esp, 4
mov ecx, dword [eax + 0x38]
mov eax, dword [ebp - 0x58]
mov dword [edi + 0x38], ecx
mov edx, dword [esi + 0x24]
cmp eax, 0xffffffff
mov dword [edx + 0x38], edi
mov dword [ebx + 0x60], edi
mov dword [esi + 0x24], edi
je 0x50753a
push eax
push edi
mov ecx, esi
call fcn.00507700
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4