Function at 0x520230
Capabilities:
Get common file path
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c49ad
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x25c
push ebx
push esi
mov ebx, ecx
push edi
mov dword [ebp - 0x10], esp
push dword [ebx + 0xe0]
mov byte [ebx + 0x120], 1
push dword [ebp + 8]
push dword [ebx + 0xe4]
call fcn.005854c0
push dword [ebx + 0xf0]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x3020100
push eax
push dword [ebx + 0xf4]
mov dword [ebp - 0x1c], 0x7060504
mov dword [ebp - 0x18], 0xb0a0908
mov dword [ebp - 0x14], 0xf0e0d0c
call fcn.005854c0
add esp, 0x18
lea eax, [ebp - 0x268]
push eax
push 0
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea edi, [ebp - 0x268]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x5202c3
push 0
push 0x80
push 3
push 0
push 0
push closesocket
lea eax, [ebp - 0x268]
mov ecx, 0xc
mov esi, str.Aeroadmin_settings.bin
rep movsd dword es:[edi], dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp + 8], edi
cmp edi, 0xffffffff
je 0x520a77
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [ebp - 0x24], esi
cmp esi, 5
jae 0x5204ba
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
push 0x20
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 0
call fcn.0044a110
mov ecx, 7
mov dword [ebp - 0x2c], 0x1e
mov esi, str.Settings.bin_size_is_too_small
mov dword [ebp - 0x28], 0x1f
mov edi, eax
mov dword [ebp - 0x3c], eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov byte [eax + 0x1e], 0
push 0x20
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 1
call fcn.0044a110
mov ecx, dword [str.settings_bin_small]
mov edx, eax
mov dword [ebp - 0x44], 0x12
mov dword [ebp - 0x40], 0x1f
mov dword [ebp - 0x54], edx
mov dword [edx], ecx
mov ecx, dword [0x5f3310]
mov dword [edx + 4], ecx
mov ecx, dword [0x5f3314]
mov dword [edx + 8], ecx
mov eax, dword [0x5f3318]
mov dword [edx + 0xc], eax
mov ax, word [0x5f331c]
mov word [edx + 0x10], ax
mov byte [edx + 0x12], 0
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 2
push eax
push 0x39c
lea eax, [ebp - 0x3c]
mov ecx, 2
push str.settings.cpp
push eax
lea edx, [ebp - 0x54]
call fcn.004d4b60
mov ecx, dword [ebp - 0x40]
add esp, 0x10
cmp ecx, 0x10
jb 0x520415
mov edx, dword [ebp - 0x54]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x52040b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a8a
push ecx
push edx
call fcn.00583877
add esp, 8
mov ecx, dword [ebp - 0x28]
cmp ecx, 0x10
jb 0x520449
mov edx, dword [ebp - 0x3c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x52043f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a8a
push ecx
push edx
call fcn.00583877
add esp, 8
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x52049e
mov ebx, dword [ebp - 0x18]
mov esi, edi
cmp esi, ebx
je 0x52046e
lea esp, [esp]
mov ecx, esi
call fcn.00438e00
add esi, 0x40
cmp esi, ebx
jne 0x520460
mov ecx, dword [ebp - 0x14]
mov eax, edi
sub ecx, edi
and ecx, 0xffffffc0
cmp ecx, 0x1000
jb 0x520494
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a8a
push ecx
push edi
call fcn.00583877
add esp, 8
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push esi
call fcn.00583e4c
add esp, 4
mov dword [ebp + 8], eax
lea ecx, [ebp - 0x68]
push 0
push ecx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x5208d3
mov edi, dword [ebp - 0x24]
cmp dword [ebp - 0x68], edi
jne 0x5208d3
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
push edi
lea ecx, [ebp - 0x60]
mov dword [ebp - 4], 6
call fcn.00467cb0
push dword [ebx + 0xf4]
lea ecx, [ebx + 0x6c]
push dword [ebx + 0xe0]
push dword [ebx + 0xe4]
call fcn.0046d8b0
mov eax, dword [ebx + 0x70]
lea ecx, [ebx + 0x70]
push edi
mov edi, dword [ebp + 8]
push edi
mov esi, dword [eax + 0x20]
mov eax, dword [ebp - 0x60]
add eax, dword [ebp - 0x64]
push eax
call esi
push edi
call fcn.005838d8
lea edx, [ebp - 0x24]
lea ecx, [ebp - 0x64]
call fcn.0044c6a0
lea ecx, [ebp + 8]
call fcn.00523f10
mov edx, dword [ebp - 0x5c]
lea ecx, [ebp + 8]
sub edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x64]
sub edx, eax
add eax, dword [ebp - 0x60]
push edx
push eax
call fcn.00523f50
mov eax, dword [ebp + 8]
not eax
cmp dword [ebp - 0x24], eax
je 0x520749
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
push 0x20
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 7
call fcn.0044a110
mov ecx, 7
mov dword [ebp - 0x2c], 0x1e
mov esi, str.Settings.bin_has_incorrect_CRC
mov dword [ebp - 0x28], 0x1f
mov edi, eax
mov dword [ebp - 0x3c], eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov byte [eax + 0x1e], 0
push 0x20
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 8
call fcn.0044a110
mov ecx, dword [str.settings_bin_crc]
mov edx, eax
mov dword [ebp - 0x44], 0x10
mov dword [ebp - 0x40], 0x1f
mov dword [ebp - 0x54], edx
mov dword [edx], ecx
mov ecx, dword [0x5f32ac]
mov dword [edx + 4], ecx
mov ecx, dword [0x5f32b0]
mov dword [edx + 8], ecx
mov eax, dword [0x5f32b4]
mov dword [edx + 0xc], eax
mov byte [edx + 0x10], 0
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 9
push eax
push 0x3b5
lea eax, [ebp - 0x3c]
mov ecx, 2
push str.settings.cpp
push eax
lea edx, [ebp - 0x54]
call fcn.004d4b60
mov ecx, dword [ebp - 0x40]
add esp, 0x10
cmp ecx, 0x10
jb 0x520677
mov edx, dword [ebp - 0x54]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x52066d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a8f
push ecx
push edx
call fcn.00583877
add esp, 8
mov ecx, dword [ebp - 0x28]
cmp ecx, 0x10
jb 0x5206ab
mov edx, dword [ebp - 0x3c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x5206a1
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a8f
push ecx
push edx
call fcn.00583877
add esp, 8
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x5206fe
mov ebx, dword [ebp - 0x18]
mov esi, edi
cmp esi, ebx
je 0x5206ce
jmp 0x5206c0
mov ecx, esi
call fcn.00438e00
add esi, 0x40
cmp esi, ebx
jne 0x5206c0
mov ecx, dword [ebp - 0x14]
mov eax, edi
sub ecx, edi
and ecx, 0xffffffc0
cmp ecx, 0x1000
jb 0x5206f4
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a8f
push ecx
push edi
call fcn.00583877
add esp, 8
mov ecx, dword [ebp - 0x60]
test ecx, ecx
je 0x520a77
mov edx, dword [ebp - 0x58]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x52072c
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a8f
push edx
push ecx
call fcn.00583877
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea edx, [ebx + 0x2c0]
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x64]
call fcn.0051b350
mov ecx, dword [ebp - 0x60]
test ecx, ecx
je 0x520a77
mov edx, dword [ebp - 0x58]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x52072c
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a8f
jmp 0x52072c
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
push 0x20
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 3
call fcn.0044a110
mov ecx, dword [str.Settings.bin_size_is_0]
mov edx, eax
mov dword [ebp - 0x2c], 0x16
mov dword [ebp - 0x28], 0x1f
mov dword [ebp - 0x3c], edx
mov dword [edx], ecx
mov ecx, dword [0x5f3324]
mov dword [edx + 4], ecx
mov ecx, dword [0x5f3328]
mov dword [edx + 8], ecx
mov eax, dword [0x5f332c]
mov dword [edx + 0xc], eax
mov eax, dword [0x5f3330]
mov dword [edx + 0x10], eax
mov ax, word [0x5f3334]
mov word [edx + 0x14], ax
mov byte [edx + 0x16], 0
push 0x20
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 4
call fcn.0044a110
mov ecx, dword [str.settings_bin_zero]
mov edx, eax
mov dword [ebp - 0x44], 0x11
mov dword [ebp - 0x40], 0x1f
mov dword [ebp - 0x54], edx
mov dword [edx], ecx
mov ecx, dword [0x5f333c]
mov dword [edx + 4], ecx
mov ecx, dword [0x5f3340]
mov dword [edx + 8], ecx
mov eax, dword [0x5f3344]
mov dword [edx + 0xc], eax
mov al, byte [0x5f3348]
mov byte [edx + 0x10], al
mov byte [edx + 0x11], 0
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 5
push eax
push 0x3a5
lea eax, [ebp - 0x3c]
mov ecx, 2
push str.settings.cpp
push eax
lea edx, [ebp - 0x54]
call fcn.004d4b60
mov ecx, dword [ebp - 0x40]
add esp, 0x10
cmp ecx, 0x10
jb 0x5209ed
mov edx, dword [ebp - 0x54]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x5209e3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a94
push ecx
push edx
call fcn.00583877
add esp, 8
mov ecx, dword [ebp - 0x28]
cmp ecx, 0x10
jb 0x520a21
mov edx, dword [ebp - 0x3c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x520a17
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a94
push ecx
push edx
call fcn.00583877
add esp, 8
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x520a6b
mov ebx, dword [ebp - 0x18]
mov esi, edi
cmp esi, ebx
je 0x520a3f
mov ecx, esi
call fcn.00438e00
add esi, 0x40
cmp esi, ebx
jne 0x520a31
mov ecx, dword [ebp - 0x14]
mov eax, edi
sub ecx, edi
and ecx, 0xffffffc0
cmp ecx, 0x1000
jb 0x520a61
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x520a94
push ecx
push edi
call fcn.00583877
add esp, 8
mov edi, dword [ebp + 8]
push edi
call fcn.005838d8
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.00591c98
call fcn.00591c98
call fcn.00591c98
int3